示例#1
0
 def test_api_builder(self, mkdir, getenv):
     mkdir.return_value = True
     getenv.side_effect = fake_env
     api = utils.get_github_api()
     assert_equals(api.request.username, 'JNRowe')
     assert_equals(api.request.api_token, 'xxx')
     assert_equals(api.request._http.cache.cache, 'cache_dir/hubugs')
示例#2
0
 def test_invalid_auth(self, getenv):
     getenv.return_value = None
     utils.get_github_api()