Changeset - e497561a7e2e
[Not reviewed]
0 1 1
Brett Smith - 7 years ago 2017-12-30 21:14:15
brettcsmith@brettcsmith.org
tests: Test Amazon Affiliate Earnings importer from 25c6454.
2 files changed with 18 insertions and 0 deletions:
0 comments (0 inline, 0 general)
tests/data/AmazonAffiliateEarnings.csv
Show inline comments
 
new file 100644
 
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
tests/data/imports.yml
Show inline comments
...
 
@@ -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
0 comments (0 inline, 0 general)