-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dcu): Add basic unit testing; fix default filename.
- Loading branch information
1 parent
1018f10
commit f33b4bb
Showing
7 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
beancount_reds_importers/importers/dcu/tests/Main_Checking_Account_Transactions.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
"DATE","TRANSACTION TYPE","DESCRIPTION","AMOUNT","ID","MEMO","CURRENT BALANCE" | ||
"12/31/2021","DEBIT","TRANSFER TO MBR ***0123 ACCT 4 MOBILE BANKING TRANSFER:123456789012345678 - SWEEP ACCOUNT","-$7,971.39","dwA4AEUAZQBKAGcAKwBGAG8ATwBQAEkAeQBiAHIAWAAvAGMAUwBVAFUAYgBzAG8AVwB2AEwAVwBNAGMARABQADQAVgBkAHcAVQA4AGkAQwA2AG8ARABTAGMAMQAxAEgAagBTAG8ANAB1ADAAcABuAFUAUwBsAHAAcQBZAFYAQgB4AFkAWABpADEARwBuAFcAcwBNADAAeQB5AGcAMgBBAFAARABFAFQARQBnAD0APQA","","$500.00" | ||
"12/30/2021","CREDIT","ELECTRONIC DEPOSIT - 3392 ACME INC DDEPOSIT 123456","$6,000.36","VwB0AG0AeABFADMANQB6AHYASQA1AGwAUQBZAEIAUgBvAFUAZQBEAEsASgA4ADAAdgB0ADYAWgBrAHgAbwBZAFkAWQBCAE4AdQArAGQAZABwAEYAZwA4AEkAdQB5AFQAbAByAHUARgBJAGoAcQBNADUAOABGADUAQgBlAHkAKwBpAHoAVQByAGsAYwBwAHgANQByADAATQBoAHIAUQBSADYASgAvAHkAegBRAD0APQA","","$8,471.39" | ||
"12/29/2021","CREDIT","ELECTRONIC DEPOSIT - 3392 ACME INC DDEPOSIT 123456","$256.00","VwBuAHAAUABxAHYAeQBSAFIANgB3ADgANQB6ADYAagB4ADcATwBtAHIAeQBjAEYAdQA1AGMAdwB3AE0AWQA0AHcANgBoAGUASABqAFYAVQBSAGEAdwBIAFYAeQBlAG8AWABKAHUAVwBNAGQARwAvAGgAUQBJAHUAbQBuAGIAYgBpAHIAZAB2AFQAVgA4AHMATQBVAHMAbQBGADQAbgAvAHQAWAA2ADIAVwBnAD0APQA","","$2,471.03" | ||
"12/28/2021","DEBIT","TRANSFER TO MBR ***0123 ACCT 4 12/31/2021 03:24 348604. ROAD RUNNER PAYMENT - SWEEP ACCOUNT","-$50.50","LwBzADgAeABnAGsAbwBVAFAAYgBQADkAMgBRAGoAZgBHADkATwBXAHYAZgBYAFoAMwBKAGIASgBTAHoAdgB0AGsAUQA5AHEASwArAHoAZwBlAFUAdwBSAGcAbwA3AHQARwA3AFMATgBwAHQAagA3ADkAYQBzAFYAUABDAFUAMwBZAEYAOQBKAHIATAAyAEUAbABmAGwAcAB0AHcAZQBnAGsAawAxAEIANgBRAD0APQA","","$2,215.03" | ||
"12/27/2021","CREDIT","ELECTRONIC DEPOSIT - ACME INCEXPENSIFY 000000","$25.00","VQAxAE8AdwA3ADcAdQB6AGgAawBOAFcAVwA3AG0AKwBRAFYAUgBPAGQATAByAC8ANABwAEYATQBMAHEAbwA3AFoAZgBFAFUARABaAFUAcABuAFcAcgBVAGgAUQA0ADkARgB4AFAAOAArAHIAZAArAHAATABTAEgAMQByADQATwByADYAZgA3AGEASwAyAGkAawBBAEYAeQBCAC8AeQAzAHQAZQBDAGgAYgB3AD0APQA","","$2,265.53" | ||
"12/26/2021","CREDIT","ELECTRONIC DEPOSIT - RANDOMCORP RECEIVABLE","$141.67","aQBoAHgATgBGAHgAZABTAEcAUwB1AEIAVQBoAE4AYQBBAHUAbQBHAHoASgBsADUAQwBLAGsAaABHAHEAUgBRAGcATQBzAFcAMgBCAGIAKwBQAGMALwBaAGwAZABuAGkANABpAGoAUQBRAG4AWQB4AFYATgBqAFAAeQBaAE0AbQB6ADMALwB6AGoAMwBsAFUAeQBrAHYAMgB3AEwAbwAzADAAMwAwADAATAB3AD0APQA","","$2,240.53" | ||
"12/25/2021","DEBIT","TRANSFER TO MBR ***0123 ACCT 4 12/22/2021 15:32 170124. - SWEEP ACCOUNT","-$2,500.99","dwBPAGUAcwBnAGUAVwBaAHgAUwArADgANQBQADcAWAAxADYAdgBCAGEAYgBqAFkAUwBZAG8AeQA5AGwAbwBoAGoAMQBYAEcAcwBPAFYAZgB1AEEAcAB1AEgATQB3AE8AOABhAEoATwBWAEoASQBqAFcAWAA0ADQAMQBsAGEATABZAFEAagBEAEgAMQBIAHcAdwB5AHQARABCAEsAWAAxAEcAMwB4AFEAVgBRAD0APQA","","$2,098.86" | ||
"12/20/2021","DEBIT","TRANSFER TO MBR ***0123 ACCT 4 12/16/2021 21:32 51592. - SWEEP ACCOUNT","-$400.15","cwBBAFgAcQBTACsANgBlAGUAegBpADMARABjAEgAMwBTAGcAMgB6AHIATQAxAEsAQgAwADUAQwA3AHgAWAB4AFgAWAA1AEcAbgA4ADYARAByADQAQgBpAE8AKwBPAHAARABWAEkAMAA0AFMAaQBKADQAegBVADIATgA4ADkAdAB1AHoAdgA4AE4ARQBtAGUASgBGAG8AYgBiAHYAMgBqAE0AMwBYADUAbABRAD0APQA","","$4,599.85" | ||
"12/18/2021","DEBIT","TRANSFER TO MBR ***0123 ACCT 3 12/16/2021 21:28 51547. - MONEY MARKET","-$5,000.00","cABXAGwATgBGADgAUgBmAG8AWgBaAC8AaQB1AC8AbgBMAEsARQB4AGcAcQBNAG8AYwBoADgAQgAwAFYAYwBJADIASwBQAGYAZwA2AHoAUgBJADIANABuAFcASwA0AEQAdQBpAHMANwBSAGkAVgBpAHAAVABkADgAUQAvACsAZwBMAHkAaQAyADMAVABwAGwAVQA2AEMAcwBMADAAZgB0AGgAYgBvAG4AZgBRAD0APQA","","$5,000.00" | ||
"12/15/2021","CREDIT","ELECTRONIC DEPOSIT - 3392 ACME INC DDEPOSIT 121521","$10,000.00","egBHAFMATQBCAGwAeABlAGoAdgBlAHMALwA1AEwAVgA3AFMAVgBJAEgANgBnADEAcwBYAG8AegBYAFQARQBrAEMAMQA2AHYAMABLADgAQwBzAFAARABEAGsANABIAGwAKwBWAEwAYwBuAEsALwBBAHgAUQBUAGwANABIAHYATABrAEQAegBtAEQARABHADgARwBvAFMAMQBDAGMAdQBwAFUATwA2ADQASABnAD0APQA","","$10,000.00" |
31 changes: 31 additions & 0 deletions
31
beancount_reds_importers/importers/dcu/tests/Main_Checking_Account_Transactions.csv.extract
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
2021-12-15 * "ELECTRONIC DEPOSIT - 3392 ACME INC DDEPOSIT 121521" | ||
Assets:Banks:DCU:Checking 10000.00 USD | ||
|
||
2021-12-18 * "TRANSFER TO MBR ***0123 ACCT 3 12/16/2021 21:28 51547. - MONEY MARKET" | ||
Assets:Banks:DCU:Checking -5000.00 USD | ||
|
||
2021-12-20 * "TRANSFER TO MBR ***0123 ACCT 4 12/16/2021 21:32 51592. - SWEEP ACCOUNT" | ||
Assets:Banks:DCU:Checking -400.15 USD | ||
|
||
2021-12-25 * "TRANSFER TO MBR ***0123 ACCT 4 12/22/2021 15:32 170124. - SWEEP ACCOUNT" | ||
Assets:Banks:DCU:Checking -2500.99 USD | ||
|
||
2021-12-26 * "ELECTRONIC DEPOSIT - RANDOMCORP RECEIVABLE" | ||
Assets:Banks:DCU:Checking 141.67 USD | ||
|
||
2021-12-27 * "ELECTRONIC DEPOSIT - ACME INCEXPENSIFY 000000" | ||
Assets:Banks:DCU:Checking 25.00 USD | ||
|
||
2021-12-28 * "TRANSFER TO MBR ***0123 ACCT 4 12/31/2021 03:24 348604. ROAD RUNNER PAYMENT - SWEEP ACCOUNT" | ||
Assets:Banks:DCU:Checking -50.50 USD | ||
|
||
2021-12-29 * "ELECTRONIC DEPOSIT - 3392 ACME INC DDEPOSIT 123456" | ||
Assets:Banks:DCU:Checking 256.00 USD | ||
|
||
2021-12-30 * "ELECTRONIC DEPOSIT - 3392 ACME INC DDEPOSIT 123456" | ||
Assets:Banks:DCU:Checking 6000.36 USD | ||
|
||
2021-12-31 * "TRANSFER TO MBR ***0123 ACCT 4 MOBILE BANKING TRANSFER:123456789012345678 - SWEEP ACCOUNT" | ||
Assets:Banks:DCU:Checking -7971.39 USD | ||
|
||
2022-01-01 balance Assets:Banks:DCU:Checking 500.00 USD |
1 change: 1 addition & 0 deletions
1
...nt_reds_importers/importers/dcu/tests/Main_Checking_Account_Transactions.csv.file_account
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Assets:Banks:DCU:Checking |
1 change: 1 addition & 0 deletions
1
...count_reds_importers/importers/dcu/tests/Main_Checking_Account_Transactions.csv.file_date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2021-12-31 |
1 change: 1 addition & 0 deletions
1
...count_reds_importers/importers/dcu/tests/Main_Checking_Account_Transactions.csv.file_name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Main_Checking_Account_Transactions.csv |
18 changes: 18 additions & 0 deletions
18
beancount_reds_importers/importers/dcu/tests/dcu_csv_test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env python3 | ||
|
||
from os import path | ||
from beancount.ingest import regression_pytest as regtest | ||
from beancount_reds_importers.importers import dcu | ||
|
||
|
||
@regtest.with_importer( | ||
dcu.Importer( | ||
{ | ||
"main_account": "Assets:Banks:DCU:Checking", | ||
"currency": "USD", | ||
} | ||
) | ||
) | ||
@regtest.with_testdir(path.dirname(__file__)) | ||
class TestDCUCSV(regtest.ImporterTestBase): | ||
pass |