tests: Test Amazon Affiliate Earnings importer from 25c6454
.
This commit is contained in:
parent
d9f68e9817
commit
e497561a7e
2 changed files with 18 additions and 0 deletions
6
tests/data/AmazonAffiliateEarnings.csv
Normal file
6
tests/data/AmazonAffiliateEarnings.csv
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
Fee-Earnings reports from 12-01-2016 to 01-31-2017
|
||||||
|
Category,Name,ASIN,Seller,Tracking ID,Date Shipped,Price($),Items Shipped,Returns,Revenue($),Ad Fees($),Device Type Group
|
||||||
|
Books,Book,1234,Amazon.com,tid999,2016-12-04 00:00:00,26.99,1,0,26.99,2.16,PHONE
|
||||||
|
Kindle eBooks,eBook,B235,Amazon.com,tid999,2016-12-20 15:08:31,25.99,1,0,25.99,2.08,DESKTOP
|
||||||
|
Kindle eBooks,eBook,B235,Amazon.com,tid999,2017-01-06 11:27:09,25.99,0,1,-25.99,-2.08,DESKTOP
|
||||||
|
Home,Item,C236,3rd Party,tid999,2017-01-07 19:10:55,24.99,1,0,24.99,2,DESKTOP
|
|
|
@ -177,3 +177,15 @@
|
||||||
payment_id: ch_daer0ahwoh9oDeiqu2eimoD7
|
payment_id: ch_daer0ahwoh9oDeiqu2eimoD7
|
||||||
stripe_id: ch_daer0ahwoh9oDeiqu2eimoD7
|
stripe_id: ch_daer0ahwoh9oDeiqu2eimoD7
|
||||||
invoice_id: "11"
|
invoice_id: "11"
|
||||||
|
|
||||||
|
- source: AmazonAffiliateEarnings.csv
|
||||||
|
importer: amazon.EarningsImporter
|
||||||
|
expect:
|
||||||
|
- payee: Amazon
|
||||||
|
date: !!python/object/apply:datetime.date [2016, 12, 20]
|
||||||
|
amount: !!python/object/apply:decimal.Decimal ["4.24"]
|
||||||
|
currency: USD
|
||||||
|
- payee: Amazon
|
||||||
|
date: !!python/object/apply:datetime.date [2017, 1, 7]
|
||||||
|
amount: !!python/object/apply:decimal.Decimal ["-.08"]
|
||||||
|
currency: USD
|
||||||
|
|
Loading…
Reference in a new issue