From: Christian Heller Date: Sun, 28 Apr 2024 21:20:42 +0000 (+0200) Subject: Minor refactoring. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/%7B%7Bprefix%7D%7D/day_todos?a=commitdiff_plain;h=2a461c41615f68796b598e73642a9a5ffa3f7836;p=plomtask Minor refactoring. --- diff --git a/tests/utils.py b/tests/utils.py index 2a919a3..34f429e 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -70,9 +70,9 @@ class TestCaseWithServer(TestCaseWithDB): 'Content-Length': str(len(encoded_form_data))} self.conn.request('POST', target, body=encoded_form_data, headers=headers) - if redirect_location == '': - redirect_location = target if 302 == expected_code: + if redirect_location == '': + redirect_location = target self.check_redirect(redirect_location) else: self.assertEqual(self.conn.getresponse().status, expected_code)