-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: uobbank importer: add unit tests, fix several issues #70
- decimal places - still needs a full solution. The problem is, petel uses xlwt/xlrd to read excel, which use excel datatypes, which we don't want, as we want just the string, which we can then pass on to decimal.decimal - not sure exactly how decimals are stored in excel - don't end up with long floats
- Loading branch information
Showing
9 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
Binary file added
BIN
+25.5 KB
beancount_reds_importers/importers/unitedoverseas/tests/ACC_TXN_History_1234_clean.xls
Binary file not shown.
25 changes: 25 additions & 0 deletions
25
...ount_reds_importers/importers/unitedoverseas/tests/ACC_TXN_History_1234_clean.xls.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,25 @@ | ||
2023-05-02 * "NETS Debit-Consumer xxxxxxYYYY" | ||
Assets:Banks:UOB:UNIPLUS -27.9 SGD | ||
|
||
2023-05-08 * "Cash Withdrawal-ATM NFC Mobile WDL" | ||
Assets:Banks:UOB:UNIPLUS -60.0 SGD | ||
|
||
2023-05-31 * "Interest Credit" | ||
Assets:Banks:UOB:UNIPLUS 0.13 SGD | ||
|
||
2023-06-05 * "Cheque Deposit" | ||
Assets:Banks:UOB:UNIPLUS 545.05 SGD | ||
|
||
2023-06-05 * "Cash Withdrawal-ATM NFC Mobile WDL" | ||
Assets:Banks:UOB:UNIPLUS -80.0 SGD | ||
|
||
2023-06-14 * "Cash Withdrawal-ATM NFC Mobile WDL" | ||
Assets:Banks:UOB:UNIPLUS -300.0 SGD | ||
|
||
2023-06-16 * "Cash Withdrawal-ATM NFC Mobile WDL" | ||
Assets:Banks:UOB:UNIPLUS -800.0 SGD | ||
|
||
2023-06-30 * "Interest Credit" | ||
Assets:Banks:UOB:UNIPLUS 0.12 SGD | ||
|
||
2023-07-01 balance Assets:Banks:UOB:UNIPLUS 0.0 SGD |
1 change: 1 addition & 0 deletions
1
...reds_importers/importers/unitedoverseas/tests/ACC_TXN_History_1234_clean.xls.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:UOB:UNIPLUS |
1 change: 1 addition & 0 deletions
1
...nt_reds_importers/importers/unitedoverseas/tests/ACC_TXN_History_1234_clean.xls.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-06-30 |
1 change: 1 addition & 0 deletions
1
...nt_reds_importers/importers/unitedoverseas/tests/ACC_TXN_History_1234_clean.xls.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 @@ | ||
ACC_TXN_History_1234_clean.xls |
16 changes: 16 additions & 0 deletions
16
beancount_reds_importers/importers/unitedoverseas/tests/uobbank_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.unitedoverseas import uobbank | ||
|
||
|
||
@regtest.with_importer( | ||
uobbank.Importer({ | ||
'main_account': 'Assets:Banks:UOB:UNIPLUS', | ||
'account_number': '1234567890', | ||
'currency': 'SGD', | ||
'rounding_error': 'Equity:Rounding-Errors:Imports', | ||
}) | ||
) | ||
@regtest.with_testdir(path.dirname(__file__)) | ||
class TestUOB(regtest.ImporterTestBase): | ||
pass |
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