X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;f=tests%2Futils.py;h=34f429e9d1fcc6355cdb9d7eae8f60c9e125b2d5;hb=6ec09c59e388711c43d9eba787c65ff8f60b9ce1;hp=2a919a31dbb057f4db558861d2fafe8277db5521;hpb=e14580b4ee47363cad317e4ec1de91affe03d53a;p=plomtask 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)