Esempio n. 1
0
 def test_api_url_with_custom_host(self):
     """ Test generating an API URL with a custom host """
     auth = {'token': 'xxxx'}
     client = GithubClient('github.example.com', auth)
     self.assertEquals(
         client._api_url('/some/path'),
         'https://github.example.com/api/v3/some/path')
Esempio n. 2
0
 def test_api_url_with_custom_host(self):
     """ Test generating an API URL with a custom host """
     auth = {'token': 'xxxx'}
     client = GithubClient('github.example.com', auth)
     self.assertEquals(
         client._api_url('/some/path'),
         'https://github.example.com/api/v3/some/path')
Esempio n. 3
0
 def test_api_url_with_context(self):
     auth = {'token': 'xxxx'}
     client = GithubClient('github.com', auth)
     self.assertEquals(
         client._api_url('/some/path/{foo}', foo='bar'),
         'https://api.github.com/some/path/bar')
Esempio n. 4
0
 def test_api_url(self):
     auth = {'token': 'xxxx'}
     client = GithubClient('github.com', auth)
     self.assertEquals(
         client._api_url('/some/path'), 'https://api.github.com/some/path')
Esempio n. 5
0
 def test_api_url_with_context(self):
     auth = {'token': 'xxxx'}
     client = GithubClient('github.com', auth)
     self.assertEquals(
         client._api_url('/some/path/{foo}', foo='bar'),
         'https://api.github.com/some/path/bar')
Esempio n. 6
0
 def test_api_url(self):
     auth = {'token': 'xxxx'}
     client = GithubClient('github.com', auth)
     self.assertEquals(
         client._api_url('/some/path'), 'https://api.github.com/some/path')