Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PonteIneptique committed Apr 18, 2017
1 parent a6d3bb6 commit 95188f2
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions tests/baseTest.py
Expand Up @@ -19,17 +19,6 @@

from tests.make_moke import make_moke
from tests.github_fixtures import make_fixture
import json


github_user = {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"email": "octocat@github.com"
}


class BaseTest(TestCase):
Expand Down Expand Up @@ -87,6 +76,24 @@ def logged_in(self, access_token="yup", extra_mocks=None):
github_resp = 'access_token=%s' % access_token
github_matcher = re.compile('github.com/')
github_usermatcher = re.compile('https://api.github.com/user')

github_user = {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"email": "octocat@github.com"
}
if access_token in ["nbiousndegoijubdognlksdngndsgmngds"]:
github_user = {
"login": "ponteineptique",
"id": "GitSuperID",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/ponteineptique",
"email": "ponteineptique"
}
headers = {'Content-Type': 'application/json'}

with requests_mock.Mocker() as m:
Expand Down

0 comments on commit 95188f2

Please sign in to comment.