Revised the shortcut accounts in testlib_journal_entry.py.
This commit is contained in:
parent
b673c7aeaf
commit
283758ebe9
@ -309,7 +309,7 @@ class CashReceiptJournalEntryTestCase(unittest.TestCase):
|
|||||||
self.assertEqual(len(currencies[2].credit), 2)
|
self.assertEqual(len(currencies[2].credit), 2)
|
||||||
self.assertEqual(currencies[2].credit[0].no, 6)
|
self.assertEqual(currencies[2].credit[0].no, 6)
|
||||||
self.assertEqual(currencies[2].credit[0].account.code,
|
self.assertEqual(currencies[2].credit[0].account.code,
|
||||||
Accounts.RENT)
|
Accounts.RENT_INCOME)
|
||||||
self.assertEqual(currencies[2].credit[1].no, 7)
|
self.assertEqual(currencies[2].credit[1].no, 7)
|
||||||
self.assertEqual(currencies[2].credit[1].account.code,
|
self.assertEqual(currencies[2].credit[1].account.code,
|
||||||
Accounts.DONATION)
|
Accounts.DONATION)
|
||||||
@ -441,7 +441,7 @@ class CashReceiptJournalEntryTestCase(unittest.TestCase):
|
|||||||
self.assertNotIn(currencies1[0].credit[1].id, old_id)
|
self.assertNotIn(currencies1[0].credit[1].id, old_id)
|
||||||
self.assertEqual(currencies1[0].credit[1].no, 2)
|
self.assertEqual(currencies1[0].credit[1].no, 2)
|
||||||
self.assertEqual(currencies1[0].credit[1].account.code,
|
self.assertEqual(currencies1[0].credit[1].account.code,
|
||||||
Accounts.RENT)
|
Accounts.RENT_INCOME)
|
||||||
|
|
||||||
self.assertEqual(currencies1[1].code, "EUR")
|
self.assertEqual(currencies1[1].code, "EUR")
|
||||||
self.assertEqual(len(currencies1[1].debit), 1)
|
self.assertEqual(len(currencies1[1].debit), 1)
|
||||||
@ -457,7 +457,7 @@ class CashReceiptJournalEntryTestCase(unittest.TestCase):
|
|||||||
currencies0[2].credit[0].id)
|
currencies0[2].credit[0].id)
|
||||||
self.assertEqual(currencies1[1].credit[0].no, 3)
|
self.assertEqual(currencies1[1].credit[0].no, 3)
|
||||||
self.assertEqual(currencies1[1].credit[0].account.code,
|
self.assertEqual(currencies1[1].credit[0].account.code,
|
||||||
Accounts.RENT)
|
Accounts.RENT_INCOME)
|
||||||
self.assertEqual(currencies1[1].credit[1].id,
|
self.assertEqual(currencies1[1].credit[1].id,
|
||||||
currencies0[2].credit[1].id)
|
currencies0[2].credit[1].id)
|
||||||
self.assertEqual(currencies1[1].credit[1].no, 4)
|
self.assertEqual(currencies1[1].credit[1].no, 4)
|
||||||
@ -1562,7 +1562,7 @@ class TransferJournalEntryTestCase(unittest.TestCase):
|
|||||||
self.assertEqual(len(currencies[2].credit), 2)
|
self.assertEqual(len(currencies[2].credit), 2)
|
||||||
self.assertEqual(currencies[2].credit[0].no, 6)
|
self.assertEqual(currencies[2].credit[0].no, 6)
|
||||||
self.assertEqual(currencies[2].credit[0].account.code,
|
self.assertEqual(currencies[2].credit[0].account.code,
|
||||||
Accounts.RENT)
|
Accounts.RENT_INCOME)
|
||||||
self.assertEqual(currencies[2].credit[1].no, 7)
|
self.assertEqual(currencies[2].credit[1].no, 7)
|
||||||
self.assertEqual(currencies[2].credit[1].account.code,
|
self.assertEqual(currencies[2].credit[1].account.code,
|
||||||
Accounts.DONATION)
|
Accounts.DONATION)
|
||||||
@ -1728,7 +1728,7 @@ class TransferJournalEntryTestCase(unittest.TestCase):
|
|||||||
self.assertNotIn(currencies1[0].credit[1].id, old_id)
|
self.assertNotIn(currencies1[0].credit[1].id, old_id)
|
||||||
self.assertEqual(currencies1[0].credit[1].no, 2)
|
self.assertEqual(currencies1[0].credit[1].no, 2)
|
||||||
self.assertEqual(currencies1[0].credit[1].account.code,
|
self.assertEqual(currencies1[0].credit[1].account.code,
|
||||||
Accounts.RENT)
|
Accounts.RENT_INCOME)
|
||||||
|
|
||||||
self.assertEqual(currencies1[1].code, "EUR")
|
self.assertEqual(currencies1[1].code, "EUR")
|
||||||
self.assertEqual(len(currencies1[1].debit), 2)
|
self.assertEqual(len(currencies1[1].debit), 2)
|
||||||
@ -1748,7 +1748,7 @@ class TransferJournalEntryTestCase(unittest.TestCase):
|
|||||||
currencies0[2].credit[0].id)
|
currencies0[2].credit[0].id)
|
||||||
self.assertEqual(currencies1[1].credit[0].no, 3)
|
self.assertEqual(currencies1[1].credit[0].no, 3)
|
||||||
self.assertEqual(currencies1[1].credit[0].account.code,
|
self.assertEqual(currencies1[1].credit[0].account.code,
|
||||||
Accounts.RENT)
|
Accounts.RENT_INCOME)
|
||||||
self.assertEqual(currencies1[1].credit[1].id,
|
self.assertEqual(currencies1[1].credit[1].id,
|
||||||
currencies0[2].credit[1].id)
|
currencies0[2].credit[1].id)
|
||||||
self.assertEqual(currencies1[1].credit[1].no, 4)
|
self.assertEqual(currencies1[1].credit[1].no, 4)
|
||||||
@ -1914,7 +1914,7 @@ class TransferJournalEntryTestCase(unittest.TestCase):
|
|||||||
self.assertNotIn(currencies1[0].credit[1].id, old_id)
|
self.assertNotIn(currencies1[0].credit[1].id, old_id)
|
||||||
self.assertEqual(currencies1[0].credit[1].no, 2)
|
self.assertEqual(currencies1[0].credit[1].no, 2)
|
||||||
self.assertEqual(currencies1[0].credit[1].account.code,
|
self.assertEqual(currencies1[0].credit[1].account.code,
|
||||||
Accounts.RENT)
|
Accounts.RENT_INCOME)
|
||||||
|
|
||||||
self.assertEqual(currencies1[1].code, "EUR")
|
self.assertEqual(currencies1[1].code, "EUR")
|
||||||
self.assertEqual(len(currencies1[1].debit), 1)
|
self.assertEqual(len(currencies1[1].debit), 1)
|
||||||
@ -1930,7 +1930,7 @@ class TransferJournalEntryTestCase(unittest.TestCase):
|
|||||||
currencies0[2].credit[0].id)
|
currencies0[2].credit[0].id)
|
||||||
self.assertEqual(currencies1[1].credit[0].no, 3)
|
self.assertEqual(currencies1[1].credit[0].no, 3)
|
||||||
self.assertEqual(currencies1[1].credit[0].account.code,
|
self.assertEqual(currencies1[1].credit[0].account.code,
|
||||||
Accounts.RENT)
|
Accounts.RENT_INCOME)
|
||||||
self.assertEqual(currencies1[1].credit[1].id,
|
self.assertEqual(currencies1[1].credit[1].id,
|
||||||
currencies0[2].credit[1].id)
|
currencies0[2].credit[1].id)
|
||||||
self.assertEqual(currencies1[1].credit[1].no, 4)
|
self.assertEqual(currencies1[1].credit[1].no, 4)
|
||||||
|
@ -48,12 +48,16 @@ class Accounts:
|
|||||||
SALES: str = "4111-001"
|
SALES: str = "4111-001"
|
||||||
SERVICE: str = "4611-001"
|
SERVICE: str = "4611-001"
|
||||||
AGENCY: str = "4711-001"
|
AGENCY: str = "4711-001"
|
||||||
OFFICE: str = "6153-001"
|
RENT_EXPENSE: str = "6252-001"
|
||||||
TRAVEL: str = "6154-001"
|
OFFICE: str = "6253-001"
|
||||||
MEAL: str = "6172-001"
|
TRAVEL: str = "6254-001"
|
||||||
|
POSTAGE: str = "6256-001"
|
||||||
|
UTILITIES: str = "6261-001"
|
||||||
|
INSURANCE: str = "6262-001"
|
||||||
|
MEAL: str = "6272-001"
|
||||||
INTEREST: str = "7111-001"
|
INTEREST: str = "7111-001"
|
||||||
DONATION: str = "7481-001"
|
DONATION: str = "7481-001"
|
||||||
RENT: str = "7482-001"
|
RENT_INCOME: str = "7482-001"
|
||||||
|
|
||||||
|
|
||||||
def get_add_form(csrf_token: str) -> dict[str, str]:
|
def get_add_form(csrf_token: str) -> dict[str, str]:
|
||||||
@ -115,7 +119,7 @@ def get_add_form(csrf_token: str) -> dict[str, str]:
|
|||||||
"currency-16-debit-9-description": " Gas ",
|
"currency-16-debit-9-description": " Gas ",
|
||||||
"currency-16-debit-9-amount": "30000",
|
"currency-16-debit-9-amount": "30000",
|
||||||
"currency-16-credit-6-no": "6",
|
"currency-16-credit-6-no": "6",
|
||||||
"currency-16-credit-6-account_code": Accounts.RENT,
|
"currency-16-credit-6-account_code": Accounts.RENT_INCOME,
|
||||||
"currency-16-credit-6-description": " Rent ",
|
"currency-16-credit-6-description": " Rent ",
|
||||||
"currency-16-credit-6-amount": "35000",
|
"currency-16-credit-6-amount": "35000",
|
||||||
"currency-16-credit-9-account_code": Accounts.DONATION,
|
"currency-16-credit-9-account_code": Accounts.DONATION,
|
||||||
@ -349,7 +353,7 @@ def __mess_up_currencies(form: dict[str, str]) -> dict[str, str]:
|
|||||||
f"{prefix}debit-14-description": " ",
|
f"{prefix}debit-14-description": " ",
|
||||||
f"{prefix}debit-14-amount": "14.55",
|
f"{prefix}debit-14-amount": "14.55",
|
||||||
f"{prefix}credit-16-no": "7",
|
f"{prefix}credit-16-no": "7",
|
||||||
f"{prefix}credit-16-account_code": Accounts.RENT,
|
f"{prefix}credit-16-account_code": Accounts.RENT_INCOME,
|
||||||
f"{prefix}credit-16-description": " Bike ",
|
f"{prefix}credit-16-description": " Bike ",
|
||||||
f"{prefix}credit-16-amount": "19.5",
|
f"{prefix}credit-16-amount": "19.5",
|
||||||
f"{prefix}credit-22-no": "5",
|
f"{prefix}credit-22-no": "5",
|
||||||
|
Loading…
Reference in New Issue
Block a user