예제 #1
0
 def test_quote_uri_safe_key(self):
     uri = '/{foo}/{bar}'
     operation = Mock()
     operation.http = {'uri': uri}
     params = {'uri_params': {'foo': 'foo', 'bar': 'bar~'}}
     endpoint = RestEndpoint(Mock(), None, None, None)
     built_uri = endpoint.build_uri(operation, params)
     self.assertEqual(built_uri, '/foo/bar~?')
예제 #2
0
 def test_encode_uri_params_unicode(self):
     uri = '/{foo}/{bar}'
     operation = Mock()
     operation.http = {'uri': uri}
     params = {'uri_params': {'foo': u'\u2713', 'bar': 'bar'}}
     endpoint = RestEndpoint(Mock(), None, None, None)
     built_uri = endpoint.build_uri(operation, params)
     self.assertEqual(built_uri, '/%E2%9C%93/bar?')