Skip to content

Commit

Permalink
Add test for capitalonebank, which also demonstrates redstreet#57 (re…
Browse files Browse the repository at this point in the history
  • Loading branch information
m-d-brown authored and scanta2 committed Oct 13, 2023
1 parent dde9c94 commit 171b960
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 0 deletions.
75 changes: 75 additions & 0 deletions beancount_reds_importers/importers/capitalonebank/360Checking.qfx
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>
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Assets:Banks:CapitalOne
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023-03-09T04:00:00
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
360Checking.qfx
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

0 comments on commit 171b960

Please sign in to comment.