@@ -179,7 +179,8 @@ def test_is_starred(self):
179179 self .response (None , 204 )
180180 self .get ('https://api.github.com/user/starred/user/repo' )
181181
182- self .assertRaises (github3 .GitHubError , self .g .is_starred , 'user' , 'repo' )
182+ self .assertRaises (github3 .GitHubError , self .g .is_starred ,
183+ 'user' , 'repo' )
183184
184185 self .login ()
185186
@@ -193,7 +194,8 @@ def test_is_subscribed(self):
193194 self .response (None , 204 )
194195 self .get ('https://api.github.com/user/subscriptions/user/repo' )
195196
196- self .assertRaises (github3 .GitHubError , self .g .is_subscribed , 'user' , 'repo' )
197+ self .assertRaises (github3 .GitHubError , self .g .is_subscribed ,
198+ 'user' , 'repo' )
197199
198200 self .login ()
199201 assert self .g .is_subscribed (None , None ) is False
@@ -382,7 +384,8 @@ def test_iter_org_issues(self):
382384 self .get ('https://api.github.com/orgs/github3py/issues' )
383385 self .conf .update (params = {})
384386
385- self .assertRaises (github3 .GitHubError , self .g .iter_org_issues , 'github3py' )
387+ self .assertRaises (github3 .GitHubError , self .g .iter_org_issues ,
388+ 'github3py' )
386389
387390 self .login ()
388391 i = next (self .g .iter_org_issues ('github3py' ))
@@ -412,7 +415,8 @@ def test_iter_issues(self):
412415 'sort' : 'created' , 'direction' : 'asc' ,
413416 'since' : '2012-05-20T23:10:27Z' }
414417 self .conf .update (params = params )
415- assert isinstance (next (self .g .iter_issues (** params )), github3 .issues .Issue )
418+ assert isinstance (next (self .g .iter_issues (** params )),
419+ github3 .issues .Issue )
416420 self .mock_assertions ()
417421
418422 def test_iter_user_issues (self ):
@@ -423,14 +427,16 @@ def test_iter_user_issues(self):
423427 self .assertRaises (github3 .GitHubError , self .g .iter_user_issues )
424428
425429 self .login ()
426- assert isinstance (next (self .g .iter_user_issues ()), github3 .issues .Issue )
430+ assert isinstance (next (self .g .iter_user_issues ()),
431+ github3 .issues .Issue )
427432 self .mock_assertions ()
428433
429434 params = {'filter' : 'assigned' , 'state' : 'closed' , 'labels' : 'bug' ,
430435 'sort' : 'created' , 'direction' : 'asc' ,
431436 'since' : '2012-05-20T23:10:27Z' }
432437 self .conf .update (params = params )
433- assert isinstance (next (self .g .iter_user_issues (** params )), github3 .issues .Issue )
438+ assert isinstance (next (self .g .iter_user_issues (** params )),
439+ github3 .issues .Issue )
434440 self .mock_assertions ()
435441
436442 def test_iter_repo_issues (self ):
@@ -464,7 +470,8 @@ def test_iter_orgs(self):
464470 self .response ('org' , _iter = True )
465471 self .get ('https://api.github.com/users/login/orgs' )
466472
467- assert isinstance (next (self .g .iter_orgs ('login' )), github3 .orgs .Organization )
473+ assert isinstance (next (self .g .iter_orgs ('login' )),
474+ github3 .orgs .Organization )
468475 self .mock_assertions ()
469476
470477 self .get ('https://api.github.com/user/orgs' )
@@ -483,7 +490,8 @@ def test_iter_repos(self):
483490 assert isinstance (next (self .g .iter_repos ()), github3 .repos .Repository )
484491 self .mock_assertions ()
485492
486- assert isinstance (next (self .g .iter_repos ('sigmavirus24' )), github3 .repos .Repository )
493+ assert isinstance (next (self .g .iter_repos ('sigmavirus24' )),
494+ github3 .repos .Repository )
487495 self .mock_assertions ()
488496
489497 self .conf .update (params = {'type' : 'all' , 'direction' : 'desc' })
@@ -502,7 +510,8 @@ def test_iter_user_repos(self):
502510 self .conf .update (params = {"sort" : "created" })
503511 self .get ('https://api.github.com/users/sigmavirus24/repos' )
504512
505- assert isinstance (next (self .g .iter_user_repos ('sigmavirus24' , sort = "created" )),
513+ assert isinstance (next (self .g .iter_user_repos ('sigmavirus24' ,
514+ sort = "created" )),
506515 github3 .repos .Repository )
507516 self .mock_assertions ()
508517
@@ -610,17 +619,19 @@ def test_pubsubhubbub(self):
610619 ('hub.callback' , 'https://localhost/post' )]
611620 self .conf = {}
612621
613- self .assertRaises (github3 .GitHubError , self .g .pubsubhubbub , '' , '' , '' )
622+ pubsubhubbub = self .g .pubsubhubbub
623+
624+ self .assertRaises (github3 .GitHubError , pubsubhubbub , '' , '' , '' )
614625
615626 self .login ()
616- assert self . g . pubsubhubbub ('' , '' , '' ) is False
627+ assert pubsubhubbub ('' , '' , '' ) is False
617628 self .not_called ()
618629
619- assert self . g . pubsubhubbub ('foo' , 'https://example.com' , 'foo' ) is False
630+ assert pubsubhubbub ('foo' , 'https://example.com' , 'foo' ) is False
620631 self .not_called ()
621632
622633 d = dict ([(k [4 :], v ) for k , v in body ])
623- assert self . g . pubsubhubbub (** d ) is True
634+ assert pubsubhubbub (** d ) is True
624635 _ , kwargs = self .request .call_args
625636
626637 assert 'data' in kwargs
@@ -629,7 +640,7 @@ def test_pubsubhubbub(self):
629640
630641 d ['secret' ] = 'secret'
631642 body .append (('hub.secret' , 'secret' ))
632- assert self . g . pubsubhubbub (** d )
643+ assert pubsubhubbub (** d )
633644 _ , kwargs = self .request .call_args
634645 assert 'data' in kwargs
635646 assert body == kwargs ['data' ]
@@ -819,7 +830,8 @@ def test_unsubscribe(self):
819830 'sigmavirus24/github3.py' )
820831 self .conf = {}
821832
822- self .assertRaises (github3 .GitHubError , self .g .unsubscribe , 'foo' , 'bar' )
833+ self .assertRaises (github3 .GitHubError , self .g .unsubscribe ,
834+ 'foo' , 'bar' )
823835
824836 self .login ()
825837 assert self .g .unsubscribe (None , None ) is False
0 commit comments