Making all tox tests pass after pep8 fix.

Covers a few unexplained dedents (pep8ify missed them)
and an accidental use of b'.'.
This commit is contained in:
Danny Hermes
2015-08-20 16:18:42 -07:00
parent d7c0c38b8d
commit b66838e48d
3 changed files with 6 additions and 6 deletions

View File

@@ -708,8 +708,8 @@ class OAuth2Credentials(Credentials):
token_response=data.get('token_response', None), token_response=data.get('token_response', None),
scopes=data.get('scopes', None), scopes=data.get('scopes', None),
token_info_uri=data.get('token_info_uri', None)) token_info_uri=data.get('token_info_uri', None))
retval.invalid = data['invalid'] retval.invalid = data['invalid']
return retval return retval
@property @property
def access_token_expired(self): def access_token_expired(self):

View File

@@ -136,8 +136,8 @@ class _PosixOpener(_Opener):
return return
lock_filename = self._posix_lockfile(self._filename) lock_filename = self._posix_lockfile(self._filename)
start_time = time.time() start_time = time.time()
while True: while True:
try: try:
self._lock_fd = os.open(lock_filename, self._lock_fd = os.open(lock_filename,
os.O_CREAT | os.O_EXCL | os.O_RDWR) os.O_CREAT | os.O_EXCL | os.O_RDWR)

View File

@@ -1096,7 +1096,7 @@ class OAuth2WebServerFlowTest(unittest.TestCase):
try: try:
credentials = self.flow.step2_exchange('some random code', credentials = self.flow.step2_exchange('some random code',
http=http) http=http)
self.fail('should raise exception if exchange doesn\'t get 200') self.fail('should raise exception if exchange doesn\'t get 200')
except FlowExchangeError: except FlowExchangeError:
pass pass
@@ -1273,7 +1273,7 @@ class OAuth2WebServerFlowTest(unittest.TestCase):
payload = (b'{' payload = (b'{'
b' "access_token":"SlAV32hkKG",' b' "access_token":"SlAV32hkKG",'
b' "refresh_token":"8xLOxBtZp8",' b' "refresh_token":"8xLOxBtZp8",'
b' "id_token": "' + jwt + '"' b' "id_token": "' + jwt + b'"'
b'}') b'}')
http = HttpMockSequence([({'status': '200'}, payload)]) http = HttpMockSequence([({'status': '200'}, payload)])
credentials = self.flow.step2_exchange('some random code', http=http) credentials = self.flow.step2_exchange('some random code', http=http)