From: Dan Mick Date: Fri, 26 Jul 2013 04:41:32 +0000 (-0700) Subject: rest/test.py: earlier versions of requests.py don't quote ' ' in params X-Git-Tag: v0.67-rc3~49 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=47d0937ccb553b3e0d447b792ba6b6ca30ae96f7;p=ceph.git rest/test.py: earlier versions of requests.py don't quote ' ' in params requests 0.12.1 handles queryparams in the URL with embedded spaces; requests 0.8.2 does not. Avoid the issue by quoting the URL into expect(). Signed-off-by: Dan Mick --- diff --git a/qa/workunits/rest/test.py b/qa/workunits/rest/test.py index 60dabab9678f..f0cf1f2c7618 100755 --- a/qa/workunits/rest/test.py +++ b/qa/workunits/rest/test.py @@ -72,7 +72,7 @@ if __name__ == '__main__': expect('auth/export', 'GET', 200, 'xml', XMLHDR) expect('auth/add?entity=client.xx&' - 'caps=mon&caps=allow&caps=osd&caps=allow *', 'PUT', 200, 'json', + 'caps=mon&caps=allow&caps=osd&caps=allow+*', 'PUT', 200, 'json', JSONHDR) r = expect('auth/export?entity=client.xx', 'GET', 200, 'plain') @@ -95,7 +95,7 @@ if __name__ == '__main__': expect('auth/print-key?entity=client.xx', 'GET', 200, 'json', JSONHDR) expect('auth/print_key?entity=client.xx', 'GET', 200, 'json', JSONHDR) - expect('auth/caps?entity=client.xx&caps=osd&caps=allow rw', 'PUT', 200, + expect('auth/caps?entity=client.xx&caps=osd&caps=allow+rw', 'PUT', 200, 'json', JSONHDR) r = expect('auth/list.json', 'GET', 200, 'json') dictlist = r.myjson['output']['auth_dump']