@@ -1992,7 +1992,8 @@ def testUnsubscribePubSubHubbub(self):
19921992 self .repo .unsubscribe_from_hub ("push" , "http://requestb.in/1bc1sc61" )
19931993
19941994 def testStatisticsContributors (self ):
1995- stats = self .repo .get_stats_contributors ()
1995+ with mock .patch ("github.Requester.Consts.PROCESSING_202_WAIT_TIME" , 0 ):
1996+ stats = self .repo .get_stats_contributors ()
19961997 seenJacquev6 = False
19971998 for s in stats :
19981999 adTotal = 0
@@ -2011,7 +2012,8 @@ def testStatisticsContributors(self):
20112012 self .assertTrue (seenJacquev6 )
20122013
20132014 def testStatisticsCommitActivity (self ):
2014- stats = self .repo .get_stats_commit_activity ()
2015+ with mock .patch ("github.Requester.Consts.PROCESSING_202_WAIT_TIME" , 0 ):
2016+ stats = self .repo .get_stats_commit_activity ()
20152017 self .assertEqual (
20162018 stats [0 ].week ,
20172019 datetime (2012 , 11 , 18 , 0 , 0 , tzinfo = timezone .utc ),
@@ -2020,7 +2022,8 @@ def testStatisticsCommitActivity(self):
20202022 self .assertEqual (stats [0 ].days , [0 , 7 , 3 , 9 , 7 , 3 , 0 ])
20212023
20222024 def testStatisticsCodeFrequency (self ):
2023- stats = self .repo .get_stats_code_frequency ()
2025+ with mock .patch ("github.Requester.Consts.PROCESSING_202_WAIT_TIME" , 0 ):
2026+ stats = self .repo .get_stats_code_frequency ()
20242027 self .assertEqual (
20252028 stats [0 ].week ,
20262029 datetime (2012 , 2 , 12 , 0 , 0 , tzinfo = timezone .utc ),
@@ -2029,7 +2032,8 @@ def testStatisticsCodeFrequency(self):
20292032 self .assertEqual (stats [0 ].deletions , - 2098 )
20302033
20312034 def testStatisticsParticipation (self ):
2032- stats = self .repo .get_stats_participation ()
2035+ with mock .patch ("github.Requester.Consts.PROCESSING_202_WAIT_TIME" , 0 ):
2036+ stats = self .repo .get_stats_participation ()
20332037 self .assertEqual (
20342038 stats .owner ,
20352039 [
@@ -2146,7 +2150,8 @@ def testStatisticsParticipation(self):
21462150 )
21472151
21482152 def testStatisticsPunchCard (self ):
2149- stats = self .repo .get_stats_punch_card ()
2153+ with mock .patch ("github.Requester.Consts.PROCESSING_202_WAIT_TIME" , 0 ):
2154+ stats = self .repo .get_stats_punch_card ()
21502155 self .assertEqual (stats .get (4 , 12 ), 7 )
21512156 self .assertEqual (stats .get (6 , 18 ), 2 )
21522157
0 commit comments