diff --git a/test/unit/common/test_request_helpers.py b/test/unit/common/test_request_helpers.py index 1a1f49ae4e..c7f268ea11 100644 --- a/test/unit/common/test_request_helpers.py +++ b/test/unit/common/test_request_helpers.py @@ -47,28 +47,28 @@ class TestRequestHelpers(unittest.TestCase): actual = rh.validate_params(req, ('limit', 'marker', 'end_marker')) self.assertEqual({}, actual) - req = Request.blank('', query_string='limit=1;junk=here;marker=foo') + req = Request.blank('', query_string='limit=1&junk=here&marker=foo') actual = rh.validate_params(req, ()) self.assertEqual({}, actual) - req = Request.blank('', query_string='limit=1;junk=here;marker=foo') + req = Request.blank('', query_string='limit=1&junk=here&marker=foo') actual = rh.validate_params(req, ('limit', 'marker', 'end_marker')) expected = {'limit': '1', 'marker': 'foo'} self.assertEqual(expected, actual) - req = Request.blank('', query_string='limit=1;junk=here;marker=') + req = Request.blank('', query_string='limit=1&junk=here&marker=') actual = rh.validate_params(req, ('limit', 'marker', 'end_marker')) expected = {'limit': '1', 'marker': ''} self.assertEqual(expected, actual) # ignore bad junk - req = Request.blank('', query_string='limit=1;junk=%ff;marker=foo') + req = Request.blank('', query_string='limit=1&junk=%ff&marker=foo') actual = rh.validate_params(req, ('limit', 'marker', 'end_marker')) expected = {'limit': '1', 'marker': 'foo'} self.assertEqual(expected, actual) # error on bad wanted parameter - req = Request.blank('', query_string='limit=1;junk=here;marker=%ff') + req = Request.blank('', query_string='limit=1&junk=here&marker=%ff') with self.assertRaises(HTTPException) as raised: rh.validate_params(req, ('limit', 'marker', 'end_marker')) self.assertEqual(raised.exception.status_int, 400) @@ -78,24 +78,24 @@ class TestRequestHelpers(unittest.TestCase): actual = rh.validate_container_params(req) self.assertEqual({'limit': 10000}, actual) - req = Request.blank('', query_string='limit=1;junk=here;marker=foo') + req = Request.blank('', query_string='limit=1&junk=here&marker=foo') actual = rh.validate_container_params(req) expected = {'limit': 1, 'marker': 'foo'} self.assertEqual(expected, actual) - req = Request.blank('', query_string='limit=1;junk=here;marker=') + req = Request.blank('', query_string='limit=1&junk=here&marker=') actual = rh.validate_container_params(req) expected = {'limit': 1, 'marker': ''} self.assertEqual(expected, actual) # ignore bad junk - req = Request.blank('', query_string='limit=1;junk=%ff;marker=foo') + req = Request.blank('', query_string='limit=1&junk=%ff&marker=foo') actual = rh.validate_container_params(req) expected = {'limit': 1, 'marker': 'foo'} self.assertEqual(expected, actual) # error on bad wanted parameter - req = Request.blank('', query_string='limit=1;junk=here;marker=%ff') + req = Request.blank('', query_string='limit=1&junk=here&marker=%ff') with self.assertRaises(HTTPException) as raised: rh.validate_container_params(req) self.assertEqual(raised.exception.status_int, 400) diff --git a/test/unit/proxy/controllers/test_container.py b/test/unit/proxy/controllers/test_container.py index 34686a1f19..7e3c6029fe 100644 --- a/test/unit/proxy/controllers/test_container.py +++ b/test/unit/proxy/controllers/test_container.py @@ -1668,7 +1668,7 @@ class TestContainerController(TestRingBase): def _build_request(self, headers, params, infocache=None): # helper to make a GET request with caches set in environ - query_string = '?' + ';'.join('%s=%s' % (k, v) + query_string = '?' + '&'.join('%s=%s' % (k, v) for k, v in params.items()) container_path = '/v1/a/c' + query_string request = Request.blank(container_path, headers=headers)