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