From a2d467172486042432ae102e7ebe3df738d82d6c Mon Sep 17 00:00:00 2001 From: Oliver Falk Date: Mon, 24 Feb 2020 12:28:58 +0100 Subject: [PATCH] Sometimes redirs are hard to test :-/ --- ivatar/ivataraccount/test_views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ivatar/ivataraccount/test_views.py b/ivatar/ivataraccount/test_views.py index 057db68..ddb3906 100644 --- a/ivatar/ivataraccount/test_views.py +++ b/ivatar/ivataraccount/test_views.py @@ -1225,10 +1225,12 @@ class Tester(TestCase): # pylint: disable=too-many-public-methods ) ) url = '%s?%s' % (urlobj.path, urlobj.query) - response = self.client.get(url, follow=True) + response = self.client.get(url, follow=False) self.assertRedirects( response=response, expected_url='/gravatarproxy/1b1d0b654430c012e47e350db07c83c5?s=80&default=mm', + status_code=302, + target_status_code=200, msg_prefix='Why does this not redirect to the gravatarproxy and defaulting to mm?') # Eventually one should check if the data is the same