Files @ 281d6fed47b7
Branch filter:

Location: NPO-Accounting/experimental-accounting-api/non-profit-test-data.ledger

Joar Wandborg
[test] Added unit tests

- Moved the TransactionNotFound exception to a more appropriate place.
- Changed the serialization for AccountingExceptions
- Override the Exception.__init__ method in AccountingException
- Added __eq__ methods to accounting.models.*
- Catch the TransactionNotFound exception in transaction_get and return a
404 instead. This could be improved, perhaps in the jsonify_exceptions
decorator so that all endpoints that raise a TransactionNotFound
exception automatically return a 404.
2010/01/01 Kindly T. Donor
    ;Id: Ids can be anything
   Income:Foo:Donation   $-100.00
      ;Invoice: Projects/Foo/Invoices/Invoice20100101.pdf
   Assets:Checking       $100.00

2011/03/15 Another J. Donor
    ;Id: but mind you if they collide.
   Income:Foo:Donation   $-400.00
      ;Approval: Projects/Foo/earmark-record.txt
   Assets:Checking       $400.00

2011/04/20 (1) Baz Hosting Services, LLC
    ;Id: always make sure your IDs are unique
   Expenses:Foo:Hosting   $250.00
      ;Receipt: Projects/Foo/Expenses/hosting/AprilHostingReceipt.pdf
   Assets:Checking       $-250.00

2011/05/10 Donation to General Fund
    ;Id: if you have two transactions with the same ID, bad things may happen
   Income:Donation   $-50.00
      ;Invoice: Financial/Invoices/Invoice20110510.pdf
   Assets:Checking   $50.00

2011/04/20 (2) Baz Hosting Services, LLC
    ;Party: Baz Hosting Services, LLC
    ;Id: this is probably unique
   Expenses:Blah:Hosting   $250.00
      ;Receipt: Projects/Blah/Expenses/hosting/AprilHostingReceipt.pdf
      ;Invoice: Projects/Blah/Expenses/hosting/april-invoice.pdf
   Assets:Checking       $-250.00
      ;Statement: Financial/BankStuff/bank-statement.pdf

2011-04-25 A transaction with ISO date
    ;Id: I'm a snowflake!
   Income:Karma              KARMA-10
   Assets:Karma Account      KARMA 10

2013-12-11 PayPal donation
   ;Id: bd7f6781-fdc6-4111-b3ad-bee2247e426d
  Income:Donations:PayPal                                                $ -20.17
  Assets:Checking                                                         $ 20.17

2013-12-11 PayPal donation
   ;Id: 31048b9d-a5b6-41d7-951a-e7128e7c53c0
  Income:Donations:PayPal                                                $ -20.18
  Assets:Checking                                                         $ 20.18

2013-12-19 AngularJS Donation
   ;Id: 593d921c-07f9-496d-a1b7-47bb68ff00d4
  Assets:Checking                                                      USD -10.00
  Expenses:Donations                                                    USD 10.00

2013-12-20 PageKite donation
   ;Id: b3576a94-2a53-4d40-bd92-06b2532937f5
  Assets:Checking                                                      USD -10.00
  Expenses:Donations                                                    USD 10.00