Beispiel #1
0
 def testBuildUrlWithOneParam(self):
     self.assertEqual(sonar.getApiServiceUrl('http://host/api', 'service', {'key': 'value'}), 'http://host/api/service?key=value')
Beispiel #2
0
 def testBuildUrlWithTwoParams(self):
     self.assertEqual(sonar.getApiServiceUrl('http://host/api', 'service', {'k1': 'v1', 'k2': 'v2'}), 'http://host/api/service?k2=v2&k1=v1')
Beispiel #3
0
 def testBuildUrlWithoutParams(self):
     self.assertEqual(sonar.getApiServiceUrl('http://host/api', 'service'), 'http://host/api/service')
Beispiel #4
0
 def testBuildUrlWithEscapedParamValue(self):
     self.assertEqual(sonar.getApiServiceUrl('http://host/api', 'service', {'key': 'hello world'}), 'http://host/api/service?key=hello%20world')