55from django .urls import reverse as urlreverse
66from django .contrib .auth .models import User
77
8+ import debug # pyflakes:ignore
9+
810from ietf .community .models import CommunityList , SearchRule , EmailSubscription
911from ietf .community .utils import docs_matching_community_list_rule , community_list_rules_matching_doc
1012from ietf .community .utils import reset_name_contains_index_for_rule
1416from ietf .doc .utils import add_state_change_event
1517from ietf .person .models import Person , Email
1618from ietf .utils .test_data import make_test_data
17- from ietf .utils .test_utils import login_testing_unauthorized , TestCase
19+ from ietf .utils .test_utils import login_testing_unauthorized , TestCase , unicontent
1820from ietf .utils .mail import outbox
1921from ietf .group .factories import GroupFactory
2022from ietf .person .factories import PersonFactory
@@ -83,7 +85,7 @@ def test_view_list(self):
8385 )
8486 r = self .client .get (url )
8587 self .assertEqual (r .status_code , 200 )
86- self .assertTrue (draft .name in r . content )
88+ self .assertTrue (draft .name in unicontent ( r ) )
8789
8890 def test_manage_personal_list (self ):
8991 draft = make_test_data ()
@@ -103,7 +105,7 @@ def test_manage_personal_list(self):
103105 # document shows up on GET
104106 r = self .client .get (url )
105107 self .assertEqual (r .status_code , 200 )
106- self .assertTrue (draft .name in r . content )
108+ self .assertTrue (draft .name in unicontent ( r ) )
107109
108110 # remove document
109111 r = self .client .post (url , { "action" : "remove_document" , "document" : draft .pk })
@@ -240,7 +242,7 @@ def test_csv(self):
240242 r = self .client .get (url )
241243 self .assertEqual (r .status_code , 200 )
242244 # this is a simple-minded test, we don't actually check the fields
243- self .assertTrue (draft .name in r . content )
245+ self .assertTrue (draft .name in unicontent ( r ) )
244246
245247 def test_csv_for_group (self ):
246248 draft = make_test_data ()
@@ -273,12 +275,12 @@ def test_feed(self):
273275 )
274276 r = self .client .get (url )
275277 self .assertEqual (r .status_code , 200 )
276- self .assertTrue (draft .name in r . content )
278+ self .assertTrue (draft .name in unicontent ( r ) )
277279
278280 # only significant
279281 r = self .client .get (url + "?significant=1" )
280282 self .assertEqual (r .status_code , 200 )
281- self .assertTrue ('<entry>' not in r . content )
283+ self .assertTrue ('<entry>' not in unicontent ( r ) )
282284
283285 def test_feed_for_group (self ):
284286 draft = make_test_data ()
0 commit comments