Commit Graph

38 Commits

Author SHA1 Message Date
818c357613 Revised the next URI utilities to apply URLSafeSerializer for encoding and decoding the next URI, in order to prevent tampering with the next URI. 2023-05-23 09:30:19 +08:00
359c335662 Revised the way to import from the datetime package, to avoid name conflict with the common "date" and "time" names. 2023-04-26 13:17:31 +08:00
4be1ead6b5 Added the "accounting-init-db" console command to the database initialization of the test site, for simplicity. 2023-04-10 23:58:08 +08:00
700e4f822a Merged the "init-db" console command to the Flask application initialization in the test site, to simplify the code. 2023-04-10 23:50:16 +08:00
c4a8326bfc Added the "accounting-init-db" console command to replace the trivial "accounting-init-base", "accounting-init-accounts" and "accounting-init-currencies" console commands. 2023-04-10 23:38:27 +08:00
f8ea863b80 Moved the add_journal_entry and match_journal_entry_detail functions from testlib_journal_entry.py to testlib.py. They are used by everyone, and testlib_journal_entry.py is only for test_journal_entry.py to shorten the code in one single file. 2023-04-09 11:46:55 +08:00
4c2dcc5070 Renamed the project from "Mia! Accounting Flask" to "Mia! Accounting". 2023-04-04 18:26:54 +08:00
d2f11e8779 Replaced the "editor" and "editor2" accounts in the test site with "admin" and "editor", to be clear. 2023-03-24 08:53:35 +08:00
361b18e411 Moved the duplicated NEXT_URI constant from test_account.py and testlib_journal_entry.py to testlib.py. 2023-03-23 17:22:57 +08:00
b60cc7902d Revised the test_delete test in the AccountTestCase test case. 2023-03-22 00:37:26 +08:00
623313b58a Renamed the constants to be upper-cased in test_account.py. 2023-03-22 00:37:26 +08:00
d0d2d77a2e Added the limitation so that essential accounts, like cash, and the accounts in use, cannot be deleted. 2023-03-22 00:37:26 +08:00
5571c0d01f Renamed all the is_XXX_needed properties to is_need_XXX. For example, especially the is_offset_needed property to is_need_offset, to be clear and understandable. 2023-03-18 22:52:29 +08:00
d9ecf51c6d Added the "create_test_app" function in testlib.py to replace "create_app" to prevent common mistakes. Added a get_csrf_token_view route to the application, and changed the get_csrf_token function to retrieve the CSRF token with the route without parsing the HTML for the CSRF token. 2023-03-14 21:28:35 +08:00
1d6a53f7cd Revised the account form so that the if-offset-needed option is only available for real accounts. 2023-03-12 01:34:42 +08:00
9cd9e90be0 Renamed the variables in the tests of the AccountTestCase and CurrencyTestCase test cases, for simplicity. 2023-03-01 21:09:14 +08:00
2839dc60b4 Revised the documentation of the PREFIX constant in test_account.py, test_currency.py, and test_transaction.py. 2023-03-01 20:22:27 +08:00
3126ee8153 Added the NEXT_URI constant to test_account.py, for consistency. 2023-02-27 16:37:01 +08:00
5a6e4f5b5e Replaced the import for the db object from the accounting model with the test site in test_account.py and test_currency.py. They are the same object, and the db object from the test site is safe at the compile time. 2023-02-25 18:04:32 +08:00
f878ba5535 Revised to rewind the time in the test_update_not_modified tests of the AccountTestCase and CurrencyTestCase test cases, so that the test cases don't have to wait for the time to be different. 2023-02-25 18:04:29 +08:00
e7c36ba13a Revised the type hints in the test_update_not_modified tests of the AccountTestCase and CurrencyTestCase test cases. 2023-02-25 18:04:27 +08:00
2e3633b205 Revised to sort the accounts in the same base before saving an account to a new base, and added the test_change_base_code test to the AccountTestCase test case for this. 2023-02-25 09:44:17 +08:00
d9c08568cf Revised the test_update_not_modified tests to be more specific in the AccountTestCase and CurrencyTestCase test cases. 2023-02-21 09:38:31 +08:00
2ab60b2224 Replaced "unittest.TestCase.assert*" methods with "assert" in the common test functions, for simplicity. 2023-02-13 19:18:41 +08:00
d99f592cff Merged the "accounting.database" module into the "accounting" module. It has only one member as "db", the database instance, and does not need to be separated into another file. 2023-02-08 11:13:09 +08:00
f7ce94902f Revised the AccountTestCase test case, added the test_add, test_basic_update, test_update_not_modified, test_created_updated_by, test_l10n, and test_delete test to replace the simple test_change_base test. 2023-02-07 11:29:09 +08:00
52351c52bc Revised the imports in test_base_account.py and test_account.py. 2023-02-06 21:45:56 +08:00
591fb4a7ab Replaced the UserClient class and the get_user_client function with the get_client function in the tests, for simplicity. 2023-02-06 21:45:28 +08:00
6b94cfb908 Removed excess blank lines in test_account.py and test_base_account.py. 2023-02-06 19:57:19 +08:00
cea2a44226 Added the order and sorting routes to the test_nobody, test_viewer, and test_editor tests of the AccountTestCase test case. 2023-02-03 12:57:53 +08:00
784e7bde49 Added the test_reorder test to the AccountTestCase test case. 2023-02-03 12:57:53 +08:00
60280f415d Shortened the variable names in the test_change_base test of the AccountTestCase test case. 2023-02-03 12:57:53 +08:00
6a83f95c9f Added the test_change_base test to the AccountTestCase test case. 2023-02-03 12:57:53 +08:00
4aed2f6ba7 Renamed the "testsite" application to "test_site". 2023-02-03 12:57:53 +08:00
6876fdf75e Added the test_editor test to the AccountTestCase test case. 2023-02-03 12:57:53 +08:00
d9624c7be6 Revised the AccountTestCase test case for simplicity. 2023-02-03 12:57:53 +08:00
dd3690dd6a Added the AccountTestCase test case with the test_nobody and test_viewer tests. 2023-02-03 12:57:53 +08:00
3312c835fd Added the AccountCommandTestCase test case. 2023-02-03 12:57:53 +08:00