add test for no-duplicates on bank import
This commit is contained in:
parent
3005cc1ae9
commit
f179ac2ccd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user