Annotate test_auth_backends.py.

This commit is contained in:
Umair Khan 2016-08-08 13:57:34 +05:00 committed by Tim Abbott
parent 1259bc3057
commit 0dfc757447
1 changed files with 6 additions and 0 deletions

View File

@ -192,7 +192,9 @@ class GitHubAuthBackendTest(AuthedTestCase):
self.name)
def test_github_backend_do_auth_for_default(self):
# type: () -> None
def authenticate(*args, **kwargs):
# type: (*Any, **Any) -> None
assert isinstance(kwargs['backend'], GithubOAuth2) == True
with mock.patch('social.backends.github.GithubOAuth2.user_data',
@ -204,7 +206,9 @@ class GitHubAuthBackendTest(AuthedTestCase):
self.backend.do_auth('fake-access-token', response=response)
def test_github_backend_do_auth_for_team(self):
# type: () -> None
def authenticate(*args, **kwargs):
# type: (*Any, **Any) -> None
assert isinstance(kwargs['backend'], GithubTeamOAuth2) == True
with mock.patch('social.backends.github.GithubTeamOAuth2.user_data',
@ -217,7 +221,9 @@ class GitHubAuthBackendTest(AuthedTestCase):
self.backend.do_auth('fake-access-token', response=response)
def test_github_backend_do_auth_for_org(self):
# type: () -> None
def authenticate(*args, **kwargs):
# type: (*Any, **Any) -> None
assert isinstance(kwargs['backend'], GithubOrganizationOAuth2) == True
with mock.patch('social.backends.github.GithubOrganizationOAuth2.user_data',