8000 Migrated authorization with optional scope to unit/test_github.py by itsmemattchung · Pull Request #471 · sigmavirus24/github3.py · GitHub
[go: up one dir, main page]

Skip to content

Migrated authorization with optional scope to unit/test_github.py #471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions tests/test_issue_authorize_optional_scope.py

This file was deleted.

12 changes: 12 additions & 0 deletions tests/unit/test_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ def test_authorization(self):
url_for('authorizations/10'),
)

def test_authorize_without_scope(self):
"""Show an authorization can be created for a user without scope."""
self.instance.authorize('username', 'password')
self.session.temporary_basic_auth.assert_called_once_with(
'username', 'password'
)
self.post_called_with(
url_for('authorizations'),
data={'note': '', 'note_url': '', 'client_id': '',
'client_secret': ''}
)

def test_authorize(self):
"""Show an authorization can be created for a user."""
self.instance.authorize('username', 'password', ['user', 'repo'])
Expand Down
0