Skip to content

Commit 7084078

Browse files
committed
Fix test asserts
1 parent afd327d commit 7084078

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/image/test_plugins.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff 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()

0 commit comments

Comments
 (0)