ihatemoney/ihatemoney/tests
TomRoussel 720f0e52dd
Adding bill types and automatic settling between people (#1290)
* Bill types added in Bill and Project Model, Implemented in BillForm
* import and export bill feature updated with bill type, tests modified to reflect the behavior
* eliminating unnecessary bill type
* typo fixed, test cases fixed for the current bill types
* button added
* settle button added
* new changes
* test cases added
* bchen-reimbursement
* tests for different bill types
* test cases fixed
* fixed reimbursement test case
* Replaced assertEqual with assert
* Fixed missing bill_type in unit tests
* Removed commented code
* Reverted unnecessary string edit
* Changed bill_type to an Enum
* Added test checking correct bill_type validation
* Fixed  billtype displaying in all caps
* Removed 'Transfer' bill type
* Added migration rule and set default bill_type in alembic
* bill_type is now an optional parameter in the BillForm
* Use enum name instead of value as SQL server_default

SQLAlchemy uses the Enum names in the database, as the values could be
generic python objects.
https://docs.sqlalchemy.org/en/20/core/type_basics.html#sqlalchemy.types.Enum

* Removed bill type from the Bills html table
* Replaced string bill type with enum
* Made "Settlement" translatable
* Manually handle the new Enum creation

Alembic does not handle postgres Enums correctly, so we need to manually
generate the new enum type.
See https://github.com/sqlalchemy/alembic/issues/278

---------

Co-authored-by: Ruitao Li <ruital@andrew.cmu.edu>
Co-authored-by: MelodyZhangYiqun <98992024+MelodyZhangYiqun@users.noreply.github.com>
Co-authored-by: Ruitao Li <49292515+FlowingCloudRTL@users.noreply.github.com>
Co-authored-by: MelodyZhangYiqun <yiqunz@andrew.cmu.edu>
Co-authored-by: Brandan Chen <bychen@andrew.cmu.edu>
Co-authored-by: Emilie Zhou <54161959+ez157@users.noreply.github.com>
Co-authored-by: Tom <tom.roussel@esat.kuleuven.be>
2024-03-16 12:20:48 +01:00
..
common tests: migrate to pytest 2023-10-01 23:33:36 +02:00
__init__.py Absolute imports & some other improvements (#243) 2017-07-07 00:06:56 +02:00
api_test.py Adding bill types and automatic settling between people (#1290) 2024-03-16 12:20:48 +01:00
budget_test.py Adding bill types and automatic settling between people (#1290) 2024-03-16 12:20:48 +01:00
conftest.py move from setuptools to hatch (#1258) 2023-12-12 14:20:34 +01:00
history_test.py Adding bill types and automatic settling between people (#1290) 2024-03-16 12:20:48 +01:00
ihatemoney.cfg tests: speed up unit tests (#1215) 2023-08-13 00:04:06 +02:00
ihatemoney_envvar.cfg tests: speed up unit tests (#1215) 2023-08-13 00:04:06 +02:00
import_test.py Adding bill types and automatic settling between people (#1290) 2024-03-16 12:20:48 +01:00
main_test.py Adding bill types and automatic settling between people (#1290) 2024-03-16 12:20:48 +01:00