10000 Merge pull request #471 from itsmemattchung/migrate-tests/auth-option… · pythonthings/github3.py@9fc6672 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9fc6672

Browse files
committed
Merge pull request sigmavirus24#471 from itsmemattchung/migrate-tests/auth-optional-scope
Migrated authorization with optional scope to unit/test_github.py
2 parents ddce78d + 679358c commit 9fc6672

File tree

2 files changed

+12
-45
lines changed

2 files changed

+12
-45
lines changed

tests/test_issue_authorize_optional_scope.py

Lines changed: 0 additions & 45 deletions
This file was deleted.

tests/unit/test_github.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ def test_authorization(self):
2323
url_for('authorizations/10'),
2424
)
2525

26+
def test_authorize_without_scope(self):
27+
"""Show an authorization can be created for a user without scope."""
28+
self.instance.authorize('username', 'password')
29+
self.session.temporary_basic_auth.assert_called_once_with(
30+
'username', 'password'
31+
)
32+
self.post_called_with(
33+
url_for('authorizations'),
34+
data={'note': '', 'note_url': '', 'client_id': '',
35+
'client_secret': ''}
36+
)
37+
2638
def test_authorize(self):
2739
"""Show an authorization can be created for a user."""
2840
self.instance.authorize('username', 'password', ['user', 'repo'])

0 commit comments

Comments
 (0)
0