Changes required for Django > 4

This commit is contained in:
Oliver Falk
2022-11-22 19:38:08 +01:00
parent e68c75d74d
commit 9565ccc54e
9 changed files with 163 additions and 83 deletions

View File

@@ -50,11 +50,16 @@ class Tester(TestCase): # pylint: disable=too-many-public-methods
Test incorrect digest
"""
response = self.client.get("/avatar/%s" % "x" * 65, follow=True)
self.assertRedirects(
response=response,
expected_url="/static/img/deadbeef.png",
msg_prefix="Why does an invalid hash not redirect to deadbeef?",
self.assertEqual(
response.redirect_chain[0][0],
"/static/img/deadbeef.png",
"Doesn't redirect to static?",
)
# self.assertRedirects(
# response=response,
# expected_url="/static/img/deadbeef.png",
# msg_prefix="Why does an invalid hash not redirect to deadbeef?",
# )
def test_stats(self):
"""