home · contact · privacy
Add Process.children and improve Params/Postvars parsing and testing.
[plomtask] / tests / utils.py
index d41e7b39ad5fe07abdc701be674d9f81678cd30f..c80b34da9f3405ddabf563e577e8406af4e155eb 100644 (file)
@@ -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,