diff --git a/byro_shackspace/tests/test_bank_import.py b/byro_shackspace/tests/test_bank_import.py index c5b6d7d..10830b8 100644 --- a/byro_shackspace/tests/test_bank_import.py +++ b/byro_shackspace/tests/test_bank_import.py @@ -25,6 +25,17 @@ def bank_transaction_csv_file(): @pytest.mark.django_db def test_bank_import(bank_transaction_csv_file): assert bank_transaction_csv_file.transactions.count() == 0 - process_bank_csv(bank_transaction_csv_file) + process_bank_csv(bank_transaction_csv_file, None) + bank_transaction_csv_file.refresh_from_db() + assert bank_transaction_csv_file.transactions.count() == 6 + + +@pytest.mark.django_db +def test_bank_import_no_duplicates(bank_transaction_csv_file): + assert bank_transaction_csv_file.transactions.count() == 0 + process_bank_csv(bank_transaction_csv_file, None) + bank_transaction_csv_file.refresh_from_db() + assert bank_transaction_csv_file.transactions.count() == 6 + process_bank_csv(bank_transaction_csv_file, None) bank_transaction_csv_file.refresh_from_db() assert bank_transaction_csv_file.transactions.count() == 6