コード例 #1
0
ファイル: sonarTest.py プロジェクト: marook/python-sonar
 def testBuildUrlWithOneParam(self):
     self.assertEqual(sonar.getApiServiceUrl('http://host/api', 'service', {'key': 'value'}), 'http://host/api/service?key=value')
コード例 #2
0
ファイル: sonarTest.py プロジェクト: marook/python-sonar
 def testBuildUrlWithTwoParams(self):
     self.assertEqual(sonar.getApiServiceUrl('http://host/api', 'service', {'k1': 'v1', 'k2': 'v2'}), 'http://host/api/service?k2=v2&k1=v1')
コード例 #3
0
ファイル: sonarTest.py プロジェクト: marook/python-sonar
 def testBuildUrlWithoutParams(self):
     self.assertEqual(sonar.getApiServiceUrl('http://host/api', 'service'), 'http://host/api/service')
コード例 #4
0
ファイル: sonarTest.py プロジェクト: marook/python-sonar
 def testBuildUrlWithEscapedParamValue(self):
     self.assertEqual(sonar.getApiServiceUrl('http://host/api', 'service', {'key': 'hello world'}), 'http://host/api/service?key=hello%20world')