File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -83,8 +83,7 @@ def test_img_processing(self):
8383 with self .login_user_context (self .superuser ):
8484 response = self .client .get (self .request_url )
8585 self .assertEqual (response .status_code , 200 )
86-
87- self .assertTrue ('/test_file.jpg__50x100_q85_subsampling-2.jpg"' in res )
86+ self .assertContains (response , '/test_file.jpg__50x100_q85_subsampling-2.jpg"' )
8887
8988 # Original image is used if NEITHER width nor height are provided
9089 plugin = add_plugin (
@@ -102,9 +101,7 @@ def test_img_processing(self):
102101 with self .login_user_context (self .superuser ):
103102 response = self .client .get (self .request_url )
104103 self .assertEqual (response .status_code , 200 )
105-
106- res = response .content .decode ("utf-8" )
107- self .assertTrue ('/test_file.jpg"' in res )
104+ self .assertContains (response , '/test_file.jpg"' )
108105
109106 def test_image_form (self ):
110107 request = HttpRequest ()
You can’t perform that action at this time.
0 commit comments