replaced unittest assertions pytest assertions (#26287)

This commit is contained in:
Aarif
2021-02-11 17:40:23 +05:00
committed by GitHub
parent 2e72791491
commit 2ea9ea916a

View File

@@ -29,7 +29,7 @@ class CachedAuthMiddlewareTestCase(TestCase):
different URLconfs.
"""
response = self.client.get(test_url)
self.assertEqual(response.status_code, 200)
assert response.status_code == 200
with patch.object(User, 'get_session_auth_hash', return_value='abc123'):
response = self.client.get(test_url)
self.assertRedirects(response, redirect_url, target_status_code=target_status_code)