Skip to content

Instantly share code, notes, and snippets.

@hpk42
Created October 13, 2013 20:08
Show Gist options
  • Save hpk42/6966860 to your computer and use it in GitHub Desktop.
Save hpk42/6966860 to your computer and use it in GitHub Desktop.
class TestGitHubAPI:
def test_user(self, vcr):
vcr.use_cassette('user')
resp = self.session.get('https://api.github.com/user',
auth=('user', 'pass'))
assert resp.json()['login'] is not None
@betamax_cassette("repo")
def test_repo(self):
resp = self.session.get(
'https://api.github.com/repos/sigmavirus24/github3.py'
)
assert resp.json()['owner'] != {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment