1
1
import github3
2
- from mock import patch , Mock
3
- from tests .utils import (expect , BaseCase , load )
2
+ from tests .utils import BaseCase
4
3
5
4
"""
6
- http://github3py.readthedocs.org/en/0.7.0/github.html#github3.github.GitHub.authorize says scopes are required.
5
+ http://github3py.readthedocs.org/en/0.7.0/github.html#github3.github.GitHub
6
+ says scopes are required to create an authorization.
7
7
8
- http://developer.github.com/v3/oauth/#create-a-new-authorization (at time of writing - 2013-09-06) disagrees
8
+ http://developer.github.com/v3/oauth/#create-a-new-authorization (at time of
9
+ writing - 2013-09-06) disagrees
9
10
"""
10
11
11
12
@@ -20,7 +21,7 @@ def test_authorize_with_scope(self):
20
21
self .not_called ()
21
22
22
23
a = self .g .authorize ('user' , 'password' , scopes )
23
- expect ( a ). isinstance (github3 .auths .Authorization )
24
+ assert isinstance (a , github3 .auths .Authorization )
24
25
assert self .request .called is True
25
26
26
27
self .request .reset_mock ()
@@ -35,7 +36,7 @@ def test_authorize_without_scope(self):
35
36
self .not_called ()
36
37
37
38
a = self .g .authorize ('user' , 'password' )
38
- expect ( a ). isinstance (github3 .auths .Authorization )
39
+ assert isinstance (a , github3 .auths .Authorization )
39
40
assert self .request .called is True
40
41
41
42
self .request .reset_mock ()
0 commit comments