コード例 #1
0
ファイル: test.py プロジェクト: siruguri/three
 def test_keyword_arguments_become_parameters(self):
     t = Three("api.city.gov")
     t.services("123", foo="bar")
     params = {"foo": "bar"}
     expected = "https://api.city.gov/services/123.json"
     req.get.assert_called_with(expected, params=params)
コード例 #2
0
ファイル: test.py プロジェクト: siruguri/three
 def test_empty_services_call(self):
     t = Three("api.city.gov")
     t.services()
     expected = "https://api.city.gov/services.json"
     req.get.assert_called_with(expected, params={})
コード例 #3
0
ファイル: test.py プロジェクト: siruguri/three
 def test_specific_service_code(self):
     t = Three("api.city.gov")
     t.services("123")
     expected = "https://api.city.gov/services/123.json"
     req.get.assert_called_with(expected, params={})
コード例 #4
0
ファイル: test.py プロジェクト: isabella232/three
 def test_specific_service_code(self):
     t = Three('api.city.gov')
     t.services('123')
     expected = 'https://api.city.gov/services/123.json'
     t.session.get.assert_called_with(expected, params={})
コード例 #5
0
ファイル: test.py プロジェクト: isabella232/three
 def test_keyword_arguments_become_parameters(self):
     t = Three('api.city.gov')
     t.services('123', foo='bar')
     params = {'foo': 'bar'}
     expected = 'https://api.city.gov/services/123.json'
     t.session.get.assert_called_with(expected, params=params)
コード例 #6
0
ファイル: test.py プロジェクト: isabella232/three
 def test_empty_services_call(self):
     t = Three('api.city.gov')
     t.services()
     expected = 'https://api.city.gov/services.json'
     t.session.get.assert_called_with(expected, params={})
コード例 #7
0
ファイル: test.py プロジェクト: SeeClickFix/three
 def test_keyword_arguments_become_parameters(self):
     t = Three('api.city.gov')
     t.services('123', foo='bar')
     params = {'foo': 'bar'}
     expected = 'https://api.city.gov/services/123.json'
     t.session.get.assert_called_with(expected, params=params)
コード例 #8
0
ファイル: test.py プロジェクト: SeeClickFix/three
 def test_specific_service_code(self):
     t = Three('api.city.gov')
     t.services('123')
     expected = 'https://api.city.gov/services/123.json'
     t.session.get.assert_called_with(expected, params={})
コード例 #9
0
ファイル: test.py プロジェクト: SeeClickFix/three
 def test_empty_services_call(self):
     t = Three('api.city.gov')
     t.services()
     expected = 'https://api.city.gov/services.json'
     t.session.get.assert_called_with(expected, params={})
コード例 #10
0
def getOpen311Services():
    t = Three(open311URL, ssl_version=ssl.PROTOCOL_TLSv1)
    services = t.services()
    return services