]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rest/test.py: earlier versions of requests.py don't quote ' ' in params
authorDan Mick <dan.mick@inktank.com>
Fri, 26 Jul 2013 04:41:32 +0000 (21:41 -0700)
committerDan Mick <dan.mick@inktank.com>
Fri, 26 Jul 2013 04:41:32 +0000 (21:41 -0700)
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 <dan.mick@inktank.com>
qa/workunits/rest/test.py

index 60dabab9678fe7dc9a1364c11c9bd0fc58356f57..f0cf1f2c7618b3b42922e6a5553bdefcb3401501 100755 (executable)
@@ -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']