tests: Test Benevity disbursement importer from 1b1e2d0
.
This commit is contained in:
parent
e497561a7e
commit
c7de107267
2 changed files with 82 additions and 0 deletions
18
tests/data/Benevity.csv
Normal file
18
tests/data/Benevity.csv
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
|
||||||
|
Donations Report
|
||||||
|
#-------------------------------------------
|
||||||
|
Charity Name,"Software Freedom Conservancy, Inc."
|
||||||
|
Charity ID,850-607080900
|
||||||
|
Period Ending,2017-10-31
|
||||||
|
Payment Reference,41000123456789
|
||||||
|
Currency,USD
|
||||||
|
Payment Method,EFT
|
||||||
|
Disbursement ID,ABCDE12345
|
||||||
|
#-------------------------------------------
|
||||||
|
Participating Corporation,Project,Date of Donation,Donor First Name,Donor Last Name,Email,Address,City,State/Province,Postal Code,Activity,Comment,Transaction ID,Donation Frequency,Donation Amount,Matched Amount,Total
|
||||||
|
Company A,,2017-10-28,Dakota,Smith,a@example.com,Not shared by donor,Not shared by donor,Not shared by donor,00000,Volunteering,,67890QWERT,One-time,20.00,0,20
|
||||||
|
Company A,,2017-10-30,Dakota,Smith,a@example.com,Not shared by donor,Not shared by donor,Not shared by donor,00000,Volunteering,,67890WERTY,One-time,25.00,0,25
|
||||||
|
Company B,,2017-10-19,Not shared by donor,Not shared by donor,Not shared by donor,Not shared by donor,Not shared by donor,Not shared by donor,12345,,,67890ERTYU,Unknown,0,10.00,10
|
||||||
|
Company B,,2017-10-19,Not shared by donor,Not shared by donor,Not shared by donor,Not shared by donor,Not shared by donor,Not shared by donor,12345,,,67890RTYUI,Unknown,0,20.00,20
|
||||||
|
Company B,,2017-10-19,Not shared by donor,Not shared by donor,Not shared by donor,Not shared by donor,Not shared by donor,Not shared by donor,12345,,,67890TYUIO,Recurring,30.00,0,30
|
||||||
|
Total Donations (Gross),,,,,,,,,,,,,,,,105.00
|
Can't render this file because it has a wrong number of fields in line 4.
|
|
@ -189,3 +189,67 @@
|
||||||
date: !!python/object/apply:datetime.date [2017, 1, 7]
|
date: !!python/object/apply:datetime.date [2017, 1, 7]
|
||||||
amount: !!python/object/apply:decimal.Decimal ["-.08"]
|
amount: !!python/object/apply:decimal.Decimal ["-.08"]
|
||||||
currency: USD
|
currency: USD
|
||||||
|
|
||||||
|
- source: Benevity.csv
|
||||||
|
importer: benevity.PaymentImporter
|
||||||
|
expect:
|
||||||
|
- date: !!python/object/apply:datetime.date [2017, 10, 28]
|
||||||
|
currency: USD
|
||||||
|
disbursement_id: ABCDE12345
|
||||||
|
amount: !!python/object/apply:decimal.Decimal [20]
|
||||||
|
donation_amount: !!python/object/apply:decimal.Decimal [20]
|
||||||
|
match_amount: !!python/object/apply:decimal.Decimal [0]
|
||||||
|
payee: Dakota Smith
|
||||||
|
corporation: Company A
|
||||||
|
project: ""
|
||||||
|
comment: ""
|
||||||
|
frequency: One-time
|
||||||
|
transaction_id: 67890QWERT
|
||||||
|
- date: !!python/object/apply:datetime.date [2017, 10, 30]
|
||||||
|
currency: USD
|
||||||
|
disbursement_id: ABCDE12345
|
||||||
|
amount: !!python/object/apply:decimal.Decimal [25]
|
||||||
|
donation_amount: !!python/object/apply:decimal.Decimal [25]
|
||||||
|
match_amount: !!python/object/apply:decimal.Decimal [0]
|
||||||
|
payee: Dakota Smith
|
||||||
|
corporation: Company A
|
||||||
|
project: ""
|
||||||
|
comment: ""
|
||||||
|
frequency: One-time
|
||||||
|
transaction_id: 67890WERTY
|
||||||
|
- date: !!python/object/apply:datetime.date [2017, 10, 19]
|
||||||
|
currency: USD
|
||||||
|
disbursement_id: ABCDE12345
|
||||||
|
amount: !!python/object/apply:decimal.Decimal [10]
|
||||||
|
donation_amount: !!python/object/apply:decimal.Decimal [0]
|
||||||
|
match_amount: !!python/object/apply:decimal.Decimal [10]
|
||||||
|
payee: Anonymous
|
||||||
|
corporation: Company B
|
||||||
|
project: ""
|
||||||
|
comment: ""
|
||||||
|
frequency: Unknown
|
||||||
|
transaction_id: 67890ERTYU
|
||||||
|
- date: !!python/object/apply:datetime.date [2017, 10, 19]
|
||||||
|
currency: USD
|
||||||
|
disbursement_id: ABCDE12345
|
||||||
|
amount: !!python/object/apply:decimal.Decimal [20]
|
||||||
|
donation_amount: !!python/object/apply:decimal.Decimal [0]
|
||||||
|
match_amount: !!python/object/apply:decimal.Decimal [20]
|
||||||
|
payee: Anonymous
|
||||||
|
corporation: Company B
|
||||||
|
project: ""
|
||||||
|
comment: ""
|
||||||
|
frequency: Unknown
|
||||||
|
transaction_id: 67890RTYUI
|
||||||
|
- date: !!python/object/apply:datetime.date [2017, 10, 19]
|
||||||
|
currency: USD
|
||||||
|
disbursement_id: ABCDE12345
|
||||||
|
amount: !!python/object/apply:decimal.Decimal [30]
|
||||||
|
donation_amount: !!python/object/apply:decimal.Decimal [30]
|
||||||
|
match_amount: !!python/object/apply:decimal.Decimal [0]
|
||||||
|
payee: Anonymous
|
||||||
|
corporation: Company B
|
||||||
|
project: ""
|
||||||
|
comment: ""
|
||||||
|
frequency: Recurring
|
||||||
|
transaction_id: 67890TYUIO
|
||||||
|
|
Loading…
Reference in a new issue