Skip to content

Commit b9fc52b

Browse files
author
Inbal Tako
committed
Align timeout and default response
1 parent 04be5e9 commit b9fc52b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

securenative/api_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ def verify(self, event_options):
2828
except Exception as e:
2929
Logger.debug("Failed to call verify; {}".format(e))
3030
if self.options.fail_over_strategy is FailOverStrategy.FAIL_OPEN.value:
31-
return VerifyResult(RiskLevel.LOW.value, 0, None)
32-
return VerifyResult(RiskLevel.HIGH.value, 1, None)
31+
return VerifyResult(RiskLevel.LOW.value, 0, [])
32+
return VerifyResult(RiskLevel.HIGH.value, 1, [])

tests/api_manager_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_track_event(self):
5050

5151
@responses.activate
5252
def test_should_timeout_on_post(self):
53-
options = SecureNativeOptions(api_key="YOUR_API_KEY", auto_send=True, timeout=-1,
53+
options = SecureNativeOptions(api_key="YOUR_API_KEY", auto_send=True, timeout=0,
5454
api_url="https://api.securenative-stg.com/collector/api/v1")
5555

5656
responses.add(responses.POST, "https://api.securenative-stg.com/collector/api/v1/verify",
@@ -60,7 +60,7 @@ def test_should_timeout_on_post(self):
6060
event_manager.start_event_persist()
6161
api_manager = ApiManager(event_manager, options)
6262

63-
verify_result = VerifyResult(RiskLevel.LOW.value, 0, None)
63+
verify_result = VerifyResult(RiskLevel.LOW.value, 0, [])
6464
res = api_manager.verify(self.event_options)
6565

6666
self.assertEqual(res.risk_level, verify_result.risk_level)

0 commit comments

Comments
 (0)