@@ -286,7 +286,7 @@ def test_user_get_person_animal_events(state: State):
286
286
287
287
try :
288
288
response = requests .get (url , headers = auth_hdr )
289
- except RuntimeError as err :
289
+ except Exception as err :
290
290
print (err )
291
291
else :
292
292
assert response .status_code == 200
@@ -310,7 +310,7 @@ def test_user_get_animals(state: State):
310
310
311
311
try :
312
312
response = requests .get (url , headers = auth_hdr )
313
- except RuntimeError as err :
313
+ except Exception as err :
314
314
print (err )
315
315
else :
316
316
assert response .status_code == 200
@@ -324,6 +324,9 @@ def test_user_get_animals_sl_token(state: State):
324
324
is present in the secrets_dict file.
325
325
Note this works on the assumption the SL token is not valid, and returns
326
326
a default empty value
327
+
328
+ >> This is tricky - if SL token is correct and person_id is valid, could get animal records returned.
329
+
327
330
"""
328
331
329
332
# Build auth string value including token from state
@@ -336,8 +339,9 @@ def test_user_get_animals_sl_token(state: State):
336
339
337
340
try :
338
341
response = requests .get (url , headers = auth_hdr )
339
- except RuntimeError as err :
342
+ except Exception as err :
340
343
print (err )
344
+ pytest .fail ('test_user_get_animals_sl_token - Request failed' , pytrace = False )
341
345
else :
342
346
assert response .status_code == 200
343
347
assert response .json () == {'person_details' : {}, 'animal_details' : {}}
@@ -361,8 +365,9 @@ def test_user_get_person_animal_events_sl_token(state: State):
361
365
362
366
try :
363
367
response = requests .get (url , headers = auth_hdr )
364
- except RuntimeError as err :
368
+ except Exception as err :
365
369
print (err )
370
+ pytest .fail ('test_user_get_person_animal_events_sl_token - Request failed' , pytrace = False )
366
371
else :
367
372
assert response .status_code == 200
368
373
assert response .json () == {}
0 commit comments