Redir to deadbeef if hash is wrong

This commit is contained in:
Oliver Falk
2019-03-21 16:39:57 +01:00
parent 2f691d57e9
commit 911d0b56a5
2 changed files with 6 additions and 7 deletions

View File

@@ -61,5 +61,8 @@ class Tester(TestCase): # pylint: disable=too-many-public-methods
"""
Test incorrect digest
"""
response = self.client.get('/avatar/%s' % 'x'*65)
self.assertEqual(response.status_code, 200, 'no 200 ok?')
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?')