@@ -179,7 +179,8 @@ def test_is_starred(self):
179179self .response (None ,204 )
180180self .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
184185self .login ()
185186
@@ -193,7 +194,8 @@ def test_is_subscribed(self):
193194self .response (None ,204 )
194195self .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
198200self .login ()
199201assert self .g .is_subscribed (None ,None )is False
@@ -382,7 +384,8 @@ def test_iter_org_issues(self):
382384self .get ('https://api.github.com/orgs/github3py/issues' )
383385self .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
387390self .login ()
388391i = 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' }
414417self .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 )
416420self .mock_assertions ()
417421
418422def test_iter_user_issues (self ):
@@ -423,14 +427,16 @@ def test_iter_user_issues(self):
423427self .assertRaises (github3 .GitHubError ,self .g .iter_user_issues )
424428
425429self .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 )
427432self .mock_assertions ()
428433
429434params = {'filter' :'assigned' ,'state' :'closed' ,'labels' :'bug' ,
430435'sort' :'created' ,'direction' :'asc' ,
431436'since' :'2012-05-20T23:10:27Z' }
432437self .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 )
434440self .mock_assertions ()
435441
436442def test_iter_repo_issues (self ):
@@ -464,7 +470,8 @@ def test_iter_orgs(self):
464470self .response ('org' ,_iter = True )
465471self .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 )
468475self .mock_assertions ()
469476
470477self .get ('https://api.github.com/user/orgs' )
@@ -483,7 +490,8 @@ def test_iter_repos(self):
483490assert isinstance (next (self .g .iter_repos ()),github3 .repos .Repository )
484491self .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 )
487495self .mock_assertions ()
488496
489497self .conf .update (params = {'type' :'all' ,'direction' :'desc' })
@@ -502,7 +510,8 @@ def test_iter_user_repos(self):
502510self .conf .update (params = {"sort" :"created" })
503511self .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" )),
506515github3 .repos .Repository )
507516self .mock_assertions ()
508517
@@ -610,17 +619,19 @@ def test_pubsubhubbub(self):
610619 ('hub.callback' ,'https://localhost/post' )]
611620self .conf = {}
612621
613- self .assertRaises (github3 .GitHubError ,self .g .pubsubhubbub ,'' ,'' ,'' )
622+ pubsubhubbub = self .g .pubsubhubbub
623+
624+ self .assertRaises (github3 .GitHubError ,pubsubhubbub ,'' ,'' ,'' )
614625
615626self .login ()
616- assert self . g . pubsubhubbub ('' ,'' ,'' )is False
627+ assert pubsubhubbub ('' ,'' ,'' )is False
617628self .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
620631self .not_called ()
621632
622633d = 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
626637assert 'data' in kwargs
@@ -629,7 +640,7 @@ def test_pubsubhubbub(self):
629640
630641d ['secret' ]= 'secret'
631642body .append (('hub.secret' ,'secret' ))
632- assert self . g . pubsubhubbub (** d )
643+ assert pubsubhubbub (** d )
633644_ ,kwargs = self .request .call_args
634645assert 'data' in kwargs
635646assert body == kwargs ['data' ]
@@ -819,7 +830,8 @@ def test_unsubscribe(self):
819830'sigmavirus24/github3.py' )
820831self .conf = {}
821832
822- self .assertRaises (github3 .GitHubError ,self .g .unsubscribe ,'foo' ,'bar' )
833+ self .assertRaises (github3 .GitHubError ,self .g .unsubscribe ,
834+ 'foo' ,'bar' )
823835
824836self .login ()
825837assert self .g .unsubscribe (None ,None )is False