diff --git a/tests/data/AmazonAffiliateEarnings.csv b/tests/data/AmazonAffiliateEarnings.csv new file mode 100644 index 0000000..6ac7a42 --- /dev/null +++ b/tests/data/AmazonAffiliateEarnings.csv @@ -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 diff --git a/tests/data/imports.yml b/tests/data/imports.yml index cea69c6..21d50fb 100644 --- a/tests/data/imports.yml +++ b/tests/data/imports.yml @@ -177,3 +177,15 @@ payment_id: ch_daer0ahwoh9oDeiqu2eimoD7 stripe_id: ch_daer0ahwoh9oDeiqu2eimoD7 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