Permalink
Browse files

Stylistically consistent test_authorization.

  • Loading branch information...
sigmavirus24 committed Sep 13, 2012
1 parent 3e0d452 commit 1ffe42e2fd3b325456f43c63f8b1c174fb1f1093
Showing with 13 additions and 10 deletions.
  1. +1 −0 .gitignore
  2. +12 −10 tests/test_github.py
View
@@ -8,3 +8,4 @@ lib64/
dist/
*.egg-info/
.coverage
+htmlcov/
View
@@ -184,13 +184,15 @@ def test_authorization(self):
with expect.raises(github3.GitHubError):
self.g.authorization(1000)
- if self.auth:
- auth = self.g.authorize(self.user, self.pw, [])
- expect(auth).isinstance(github3.github.Authorization)
- auth_g = self._g.authorization(auth.id)
- expect(auth_g).isinstance(github3.github.Authorization)
- auth.delete()
- del auth
- auth = self._g.authorize(None, None, [])
- expect(auth).isinstance(github3.github.Authorization)
- auth.delete()
+ if not self.auth:
+ return
+
+ auth = self.g.authorize(self.user, self.pw, [])
+ expect(auth).isinstance(github3.github.Authorization)
+ auth_g = self._g.authorization(auth.id)
+ expect(auth_g).isinstance(github3.github.Authorization)
+ auth.delete()
+ del auth
+ auth = self._g.authorize(None, None, [])
+ expect(auth).isinstance(github3.github.Authorization)
+ auth.delete()

0 comments on commit 1ffe42e

Please sign in to comment.