Example #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')
Example #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')
Example #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')
Example #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')
Example #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')
Example #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')