diff --git a/import2ledger/importers/benevity.py b/import2ledger/importers/benevity.py index 8b29ebd..aff8171 100644 --- a/import2ledger/importers/benevity.py +++ b/import2ledger/importers/benevity.py @@ -1,7 +1,10 @@ from . import _csv from .. import strparse -class DonationsImporter(_csv.CSVImporterBase): +class Donations2018Importer(_csv.CSVImporterBase): + ENTRY_SEED = { + 'ledger template': 'benevity donations ledger entry', + } HEADER_FIELDS = { 'Currency': 'currency', 'Disbursement ID': 'disbursement_id', diff --git a/tests/data/Benevity.csv b/tests/data/Benevity2018.csv similarity index 100% rename from tests/data/Benevity.csv rename to tests/data/Benevity2018.csv diff --git a/tests/data/imports.yml b/tests/data/imports.yml index 0303dd2..f058cc3 100644 --- a/tests/data/imports.yml +++ b/tests/data/imports.yml @@ -274,8 +274,8 @@ amount: !!python/object/apply:decimal.Decimal ["-.08"] currency: USD -- source: Benevity.csv - importer: benevity.DonationsImporter +- source: Benevity2018.csv + importer: benevity.Donations2018Importer expect: - date: !!python/object/apply:datetime.date [2017, 10, 28] currency: USD @@ -289,6 +289,7 @@ comment: "" frequency: One-time transaction_id: 67890QWERT + ledger template: benevity donations ledger entry - date: !!python/object/apply:datetime.date [2017, 10, 30] currency: USD disbursement_id: ABCDE12345 @@ -301,6 +302,7 @@ comment: "" frequency: One-time transaction_id: 67890WERTY + ledger template: benevity donations ledger entry - date: !!python/object/apply:datetime.date [2017, 10, 19] currency: USD disbursement_id: ABCDE12345 @@ -313,6 +315,7 @@ comment: "" frequency: Unknown transaction_id: 67890ERTYU + ledger template: benevity donations ledger entry - date: !!python/object/apply:datetime.date [2017, 10, 19] currency: USD disbursement_id: ABCDE12345 @@ -325,6 +328,7 @@ comment: "" frequency: Unknown transaction_id: 67890RTYUI + ledger template: benevity donations ledger entry - date: !!python/object/apply:datetime.date [2017, 10, 19] currency: USD disbursement_id: ABCDE12345 @@ -337,6 +341,7 @@ comment: "" frequency: Recurring transaction_id: 67890TYUIO + ledger template: benevity donations ledger entry - source: BrightFunds.xls importer: brightfunds.DonorReportImporter