[damned-lies] Fix tests for people



commit c99960c7b1889ec66a130575ad02c76259678444
Author: Tom Tryfonidis <tomtryf gmail com>
Date:   Sun Dec 16 15:01:42 2018 +0200

    Fix tests for people

 people/tests.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/people/tests.py b/people/tests.py
index b06a80b5..0c155e84 100644
--- a/people/tests.py
+++ b/people/tests.py
@@ -98,7 +98,7 @@ class PeopleTestCase(TestCase):
         response = self.client.get(reverse('home'))
         self.assertContains(
             response,
-            '<a aria-expanded="false" aria-haspopup="true" role="button" data-toggle="dropdown" 
class="dropdown-toggle hidden-xs avatar" href="%s"><img alt="generic person icon" 
src="/static/img/nobody.png"></a>' % (
+            '<a aria-expanded="false" aria-haspopup="true" role="button" data-toggle="dropdown" 
class="dropdown-toggle hidden-xs avatar" href="%s"><img class="img-circle" alt="generic person icon" 
src="/static/img/nobody.png"></a>' % (
                 reverse('person_detail_username', args=[self.pn.username]),),
             html=True
         )
@@ -176,28 +176,28 @@ class PeopleTestCase(TestCase):
         pn = self._create_person()
         self.assertHTMLEqual(
             people.people_image(pn),
-            '<img src="/static/img/nobody.png" alt="generic person icon">'
+            '<img class="img-circle" src="/static/img/nobody.png" alt="generic person icon">'
         )
         pn.image = 'http://www.example.org/my_image.png'
         self.assertHTMLEqual(
             people.people_image(pn),
-            '<img alt="John Nothing" onerror="this.onerror = null; this.src=\'/static/img/nobody.png\'" 
src="http://www.example.org/my_image.png"; />'
+            '<img class="img-circle" alt="John Nothing" onerror="this.onerror = null; 
this.src=\'/static/img/nobody.png\'" src="http://www.example.org/my_image.png"; />'
         )
         pn.last_name = "<script>Some XSS content</script>"
         self.assertIn("&lt;script&gt;Some XSS content&lt;/script&gt;", people.people_image(pn))
         self.assertHTMLEqual(
             people.people_image(pn),
-            '<img alt="John &lt;script&gt;Some XSS content&lt;/script&gt;" onerror="this.onerror = null; 
this.src=\'/static/img/nobody.png\'" src="http://www.example.org/my_image.png"; />'
+            '<img class="img-circle" alt="John &lt;script&gt;Some XSS content&lt;/script&gt;" 
onerror="this.onerror = null; this.src=\'/static/img/nobody.png\'" src="http://www.example.org/my_image.png"; 
/>'
         )
         pn.avatar_service = 'gravatar.com'
         self.assertHTMLEqual(
             people.people_image(pn),
-            '<img alt="avatar icon" 
src="https://secure.gravatar.com/avatar/618b8b6c1c973c780ec218242c49cbe7.jpg?s=80&d=identicon&r=g";>'
+            '<img class="img-circle" alt="avatar icon" 
src="https://secure.gravatar.com/avatar/618b8b6c1c973c780ec218242c49cbe7.jpg?s=80&d=identicon&r=g";>'
         )
         pn.avatar_service = 'libravatar.org'
         self.assertHTMLEqual(
             people.people_image(pn),
-            '<img alt="avatar icon" 
src="https://seccdn.libravatar.org/avatar/618b8b6c1c973c780ec218242c49cbe7?s=80&d=identicon&r=g";>'
+            '<img class="img-circle" alt="avatar icon" 
src="https://seccdn.libravatar.org/avatar/618b8b6c1c973c780ec218242c49cbe7?s=80&d=identicon&r=g";>'
         )
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]