'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)