def test_urlparams(self): http = HttpClient() params = {'page': 2, 'key': 'foo'} request = HttpRequest(http, 'http://bla.com?k=6', 'post', params=params) data = parse_qsl(request.query) self.assertEqual(len(data), 3)
def test_urlparams(self): http = HttpClient() params = {'page': 2, 'key': 'foo'} request = HttpRequest(http, 'http://bla.com?k=6', 'post', params=params) url = urlparse(request.url) data = parse_qsl(url.query) self.assertEqual(len(data), 3)
def test_urlparams(self): http = HttpClient() urlparams = {"page": 2, "key": "foo"} request = HttpRequest(http, "http://bla.com?k=6", "post", urlparams=urlparams) params = parse_qsl(request.query) self.assertEqual(len(params), 3)