Skip to content

Commit

Permalink
analyze no small change method
Browse files Browse the repository at this point in the history
  • Loading branch information
Jwyman328 committed Nov 16, 2024
1 parent a200f26 commit 4863972
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions backend/src/tests/service_tests/test_privacy_metrics_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,19 @@ def test_analyze_no_change_fail(self):
response = PrivacyMetricsService.analyze_no_change(
mock_transaction_model)
assert response is False

def test_analyze_no_small_change_fail(self):
mock_transaction_model = MagicMock()
mock_transaction_model.sent_amount = 1000000000
mock_transaction_model.received_amount = 100
response = PrivacyMetricsService.analyze_no_small_change(
mock_transaction_model)
assert response is False

def test_analyze_no_small_change_pass(self):
mock_transaction_model = MagicMock()
mock_transaction_model.sent_amount = 1000040000
mock_transaction_model.received_amount = 1000000000
response = PrivacyMetricsService.analyze_no_small_change(
mock_transaction_model)
assert response is True

0 comments on commit 4863972

Please sign in to comment.