fraud-detection-service-api / tests /service /test_fraud_service.py
SlimG's picture
change tests folder structure
4009a1a
raw
history blame
563 Bytes
from src.service.fraud_service import check_for_fraud
from src.entity.transaction import Transaction
def test_check_for_fraud_valid(valid_transaction: Transaction):
"""
Test the method check_for_fraud
Case: valid transaction
"""
is_fraud = check_for_fraud(valid_transaction)
assert is_fraud is False
def test_check_for_fraud_invalid(fraudulent_transaction: Transaction):
"""
Test the method check_for_fraud
Case: invalid transaction
"""
is_fraud = check_for_fraud(fraudulent_transaction)
assert is_fraud is True