-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: configurable balance assertion dates
- Loading branch information
Showing
25 changed files
with
390 additions
and
40 deletions.
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
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
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
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
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
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
15 changes: 15 additions & 0 deletions
15
...ers/libreader/tests/balance_assertion_date/last_transaction/last_transaction_date_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,15 @@ | ||
from os import path | ||
from beancount.ingest import regression_pytest as regtest | ||
from beancount_reds_importers.importers import ally | ||
|
||
|
||
@regtest.with_importer( | ||
ally.Importer({ | ||
"account_number": "23456", | ||
"main_account": "Assets:Banks:Checking", | ||
"balance_assertion_date_type": "last_transaction", | ||
}) | ||
) | ||
@regtest.with_testdir(path.dirname(__file__)) | ||
class TestSmart(regtest.ImporterTestBase): | ||
pass |
90 changes: 90 additions & 0 deletions
90
...t_reds_importers/libreader/tests/balance_assertion_date/last_transaction/transactions.qfx
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,90 @@ | ||
<OFX> | ||
<SIGNONMSGSRSV1> | ||
<SONRS> | ||
<STATUS> | ||
<CODE> | ||
0</CODE> | ||
<SEVERITY> | ||
INFO</SEVERITY> | ||
</STATUS> | ||
<DTSERVER> | ||
20150102170000.000[+0:UTC]</DTSERVER> | ||
<LANGUAGE> | ||
ENG</LANGUAGE> | ||
<FI> | ||
<ORG> | ||
Great Bank of Orangeland</ORG> | ||
<FID> | ||
666</FID> | ||
</FI> | ||
</SONRS> | ||
</SIGNONMSGSRSV1> | ||
<BANKMSGSRSV1> | ||
<STMTTRNRS> | ||
<TRNUID> | ||
5678</TRNUID> | ||
<STATUS> | ||
<CODE> | ||
0</CODE> | ||
<SEVERITY> | ||
INFO</SEVERITY> | ||
</STATUS> | ||
<STMTRS> | ||
<CURDEF> | ||
USD</CURDEF> | ||
<BANKACCTFROM> | ||
<BANKID> | ||
123456789</BANKID> | ||
<ACCTID> | ||
23456</ACCTID> | ||
<ACCTTYPE> | ||
CHECKING</ACCTTYPE> | ||
</BANKACCTFROM> | ||
|
||
|
||
<BANKTRANLIST> | ||
<DTSTART> | ||
20190503000000</DTSTART> | ||
<DTEND> | ||
20190901000000</DTEND> | ||
|
||
<STMTTRN> | ||
<TRNTYPE> | ||
XFER</TRNTYPE> | ||
<DTPOSTED> | ||
20190109121112</DTPOSTED> | ||
<TRNAMT> | ||
-55.00</TRNAMT> | ||
<FITID> | ||
21302970191741</FITID> | ||
<NAME> | ||
Transfer to savings account</NAME> | ||
</STMTTRN> | ||
</BANKTRANLIST> | ||
|
||
<STMTTRN> | ||
<TRNTYPE> | ||
XFER</TRNTYPE> | ||
<DTPOSTED> | ||
20190109121112</DTPOSTED> | ||
<TRNAMT> | ||
-1000</TRNAMT> | ||
<FITID> | ||
21302970191741</FITID> | ||
<NAME> | ||
Check 23400</NAME> | ||
</STMTTRN> | ||
</BANKTRANLIST> | ||
|
||
|
||
<LEDGERBAL> | ||
<BALAMT> | ||
150.65</BALAMT> | ||
<DTASOF> | ||
20150101000000.000[+0:UTC]</DTASOF> | ||
</LEDGERBAL> | ||
</STMTRS> | ||
</STMTTRNRS> | ||
</BANKMSGSRSV1> | ||
</OFX> | ||
|
8 changes: 8 additions & 0 deletions
8
...mporters/libreader/tests/balance_assertion_date/last_transaction/transactions.qfx.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,8 @@ | ||
|
||
2019-01-09 * "Transfer to savings account" | ||
Assets:Banks:Checking -55.00 USD | ||
|
||
2019-01-09 * "Check 23400" | ||
Assets:Banks:Checking -1000 USD | ||
|
||
2019-01-10 balance Assets:Banks:Checking 150.65 USD |
1 change: 1 addition & 0 deletions
1
...ers/libreader/tests/balance_assertion_date/last_transaction/transactions.qfx.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:Checking |
1 change: 1 addition & 0 deletions
1
...orters/libreader/tests/balance_assertion_date/last_transaction/transactions.qfx.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 @@ | ||
2019-09-01T00:00:00 |
1 change: 1 addition & 0 deletions
1
...orters/libreader/tests/balance_assertion_date/last_transaction/transactions.qfx.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 @@ | ||
transactions.qfx |
15 changes: 15 additions & 0 deletions
15
beancount_reds_importers/libreader/tests/balance_assertion_date/ofx_date/ofx_date_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,15 @@ | ||
from os import path | ||
from beancount.ingest import regression_pytest as regtest | ||
from beancount_reds_importers.importers import ally | ||
|
||
|
||
@regtest.with_importer( | ||
ally.Importer({ | ||
"account_number": "23456", | ||
"main_account": "Assets:Banks:Checking", | ||
"balance_assertion_date_type": "ofx_date", | ||
}) | ||
) | ||
@regtest.with_testdir(path.dirname(__file__)) | ||
class TestSmart(regtest.ImporterTestBase): | ||
pass |
Oops, something went wrong.