@@ -115,7 +115,8 @@ def test_auth(hsclient):
115115 raise AssertionError ('401 not raised' )
116116
117117 try :
118- hsc .get_project (TEST_PROJECT_ID ).get_job ((TEST_PROJECT_ID , 1 , 1 )).items .list ()
118+ hsc .get_project (TEST_PROJECT_ID ).get_job (
119+ (TEST_PROJECT_ID , 1 , 1 )).items .list ()
119120 except HTTPError as exc :
120121 assert exc .response .status_code == 401
121122 else :
@@ -179,13 +180,13 @@ def test_requests(hsproject):
179180 job = hsproject .push_job (TEST_SPIDER_NAME , state = 'running' )
180181 # top parent
181182 r1 = job .requests .add (url = 'http://test.com/' , status = 200 , method = 'GET' ,
182- rs = 1337 , duration = 5 , parent = None , ts = ts )
183+ rs = 1337 , duration = 5 , parent = None , ts = ts )
183184 # first child
184185 r2 = job .requests .add (url = 'http://test.com/2' , status = 400 , method = 'POST' ,
185- rs = 0 , duration = 1 , parent = r1 , ts = ts + 1 )
186+ rs = 0 , duration = 1 , parent = r1 , ts = ts + 1 )
186187 # another child with fingerprint set
187188 r3 = job .requests .add (url = 'http://test.com/3' , status = 400 , method = 'PUT' ,
188- rs = 0 , duration = 1 , parent = r1 , ts = ts + 2 , fp = '1234' )
189+ rs = 0 , duration = 1 , parent = r1 , ts = ts + 2 , fp = '1234' )
189190
190191 job .requests .close ()
191192 rr = job .requests .list ()
@@ -243,7 +244,7 @@ def test_samples(hsproject):
243244def test_jobsummary (hsproject ):
244245 js = hsproject .jobsummary ()
245246 assert js .get ('project' ) == int (hsproject .projectid ), js
246- assert js .get ('has_capacity' ) == True , js
247+ assert js .get ('has_capacity' ) is True , js
247248 assert 'pending' in js , js
248249 assert 'running' in js , js
249250
@@ -253,8 +254,7 @@ def test_bulkdata(hsproject):
253254 for i in range (20 ):
254255 j .logs .info ("log line %d" % i )
255256 j .items .write (dict (field1 = "item%d" % i ))
256- j .requests .add ("http://test.com/%d" % i ,
257- 200 , 'GET' , 10 , None , 10 , 120 )
257+ j .requests .add ("http://test.com/%d" % i , 200 , 'GET' , 10 , None , 10 , 120 )
258258 for resourcename in ('logs' , 'items' , 'requests' ):
259259 resource = getattr (j , resourcename )
260260 resource .flush ()
0 commit comments