X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=sidebyside;f=tests%2Futils.py;h=c80b34da9f3405ddabf563e577e8406af4e155eb;hb=0ed752a84400e7e95c469ca6c7384d3c6b027c4f;hp=d41e7b39ad5fe07abdc701be674d9f81678cd30f;hpb=4724d02b2c8a7fac3029ae6380641c4093fa4554;p=plomtask
diff --git a/tests/utils.py b/tests/utils.py
index d41e7b3..c80b34d 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -54,9 +54,9 @@ class TestCaseWithServer(TestCaseWithDB):
self.assertEqual(self.conn.getresponse().status, expected_code)
def check_post(self, data: Mapping[str, object], target: str,
- expected_code: int, redirect_location: str = '') -> None:
+ expected_code: int, redirect_location: str = '/') -> None:
"""Check that POST of data to target yields expected_code."""
- encoded_form_data = urlencode(data).encode('utf-8')
+ encoded_form_data = urlencode(data, doseq=True).encode('utf-8')
headers = {'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': str(len(encoded_form_data))}
self.conn.request('POST', target,