forked from redstreet/beancount_reds_importers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for capitalonebank, which also demonstrates redstreet#57 (re…
- Loading branch information
Showing
6 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
75 changes: 75 additions & 0 deletions
75
beancount_reds_importers/importers/capitalonebank/360Checking.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,75 @@ | ||
<?OFX OFXHEADER="200" VERSION="202" SECURITY="NONE" OLDFILEUID="NONE" NEWFILEUID="NONE"?> | ||
<OFX> | ||
<SIGNONMSGSRSV1> | ||
<SONRS> | ||
<STATUS> | ||
<CODE>0</CODE> | ||
<SEVERITY>INFO</SEVERITY> | ||
</STATUS> | ||
<DTSERVER>20230310048208.398</DTSERVER> | ||
<LANGUAGE>ENG</LANGUAGE> | ||
<FI> | ||
<ORG>Capital One Bank</ORG> | ||
<FID>1001</FID> | ||
</FI> | ||
<INTU.BID>1236</INTU.BID> | ||
</SONRS> | ||
</SIGNONMSGSRSV1> | ||
<BANKMSGSRSV1> | ||
<STMTTRNRS> | ||
<TRNUID>0</TRNUID> | ||
<STATUS> | ||
<CODE>0</CODE> | ||
<SEVERITY>INFO</SEVERITY> | ||
</STATUS> | ||
<STMTRS> | ||
<CURDEF>USD</CURDEF> | ||
<BANKACCTFROM> | ||
<BANKID>031176110</BANKID> | ||
<ACCTID>9876</ACCTID> | ||
<ACCTTYPE>CHECKING</ACCTTYPE> | ||
</BANKACCTFROM> | ||
<BANKTRANLIST> | ||
<DTSTART>20230109050000.000</DTSTART> | ||
<DTEND>20230309040000.000</DTEND> | ||
|
||
<STMTTRN> | ||
<TRNTYPE>CREDIT</TRNTYPE> | ||
<DTPOSTED>20230228050000.000</DTPOSTED> | ||
<TRNAMT>0.01</TRNAMT> | ||
<FITID>202302283828</FITID> | ||
<MEMO>Monthly Interest Paid</MEMO> | ||
</STMTTRN> | ||
|
||
<STMTTRN> | ||
<TRNTYPE>CREDIT</TRNTYPE> | ||
<DTPOSTED>20230119050000.000</DTPOSTED> | ||
<TRNAMT>888.99</TRNAMT> | ||
<FITID>202301191113</FITID> | ||
<MEMO>Deposit from BEAN COUNTERS PAYROLL</MEMO> | ||
</STMTTRN> | ||
|
||
<STMTTRN> | ||
<TRNTYPE>DEBIT</TRNTYPE> | ||
<DTPOSTED>20230117050000.000</DTPOSTED> | ||
<TRNAMT>-100</TRNAMT> | ||
<FITID>202301171112</FITID> | ||
<MEMO>Withdrawal from AMERICAN EXPRESS ACH PMT</MEMO> | ||
</STMTTRN> | ||
<STMTTRN> | ||
<TRNTYPE>CREDIT</TRNTYPE> | ||
<DTPOSTED>20230112050000.000</DTPOSTED> | ||
<TRNAMT>444.55</TRNAMT> | ||
<FITID>202301121111</FITID> | ||
<MEMO>Deposit from BEAN COUNTERS PAYROLL</MEMO> | ||
</STMTTRN> | ||
|
||
</BANKTRANLIST> | ||
<LEDGERBAL> | ||
<BALAMT>4321.98</BALAMT> | ||
<DTASOF>20230310048208.39</DTASOF> | ||
</LEDGERBAL> | ||
</STMTRS> | ||
</STMTTRNRS> | ||
</BANKMSGSRSV1> | ||
</OFX> |
14 changes: 14 additions & 0 deletions
14
beancount_reds_importers/importers/capitalonebank/360Checking.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,14 @@ | ||
|
||
2023-01-12 * "Deposit from BEAN COUNTERS PAYROLL" "" | ||
Assets:Banks:CapitalOne 444.55 USD | ||
|
||
2023-01-17 * "Withdrawal from AMERICAN EXPRESS ACH PMT" "" | ||
Assets:Banks:CapitalOne -100 USD | ||
|
||
2023-01-19 * "Deposit from BEAN COUNTERS PAYROLL" "" | ||
Assets:Banks:CapitalOne 888.99 USD | ||
|
||
2023-02-28 * "Monthly Interest Paid" "" | ||
Assets:Banks:CapitalOne 0.01 USD | ||
|
||
2023-03-01 balance Assets:Banks:CapitalOne 4321.98 USD |
1 change: 1 addition & 0 deletions
1
beancount_reds_importers/importers/capitalonebank/360Checking.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:CapitalOne |
1 change: 1 addition & 0 deletions
1
beancount_reds_importers/importers/capitalonebank/360Checking.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 @@ | ||
2023-03-09T04:00:00 |
1 change: 1 addition & 0 deletions
1
beancount_reds_importers/importers/capitalonebank/360Checking.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 @@ | ||
360Checking.qfx |
16 changes: 16 additions & 0 deletions
16
beancount_reds_importers/importers/capitalonebank/capitalone_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,16 @@ | ||
from os import path | ||
from beancount.ingest import regression_pytest as regtest | ||
from beancount_reds_importers.importers import capitalonebank | ||
|
||
|
||
@regtest.with_importer( | ||
capitalonebank.Importer( | ||
{ | ||
"account_number": "9876", | ||
"main_account": "Assets:Banks:CapitalOne", | ||
} | ||
) | ||
) | ||
@regtest.with_testdir(path.dirname(__file__)) | ||
class TestCapitalOne(regtest.ImporterTestBase): | ||
pass |