mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-05 21:45:25 +02:00
prs-fleshgolem-2070: feat: sqlalchemy 2.0 (#2096)
* upgrade sqlalchemy to 2.0 * rewrite all db models to sqla 2.0 mapping api * fix some importing and typing weirdness * fix types of a lot of nullable columns * remove get_ref methods * fix issues found by tests * rewrite all queries in repository_recipe to 2.0 style * rewrite all repository queries to 2.0 api * rewrite all remaining queries to 2.0 api * remove now-unneeded __allow_unmapped__ flag * remove and fix some unneeded cases of "# type: ignore" * fix formatting * bump black version * run black * can this please be the last one. okay. just. okay. * fix repository errors * remove return * drop open API validator --------- Co-authored-by: Sören Busch <fleshgolem@gmx.net>
This commit is contained in:
parent
91cd00976a
commit
9e77a9f367
86 changed files with 1776 additions and 1572 deletions
2
tests/fixtures/fixture_shopping_lists.py
vendored
2
tests/fixtures/fixture_shopping_lists.py
vendored
|
@ -25,7 +25,6 @@ def create_item(list_id: UUID4) -> dict:
|
|||
|
||||
@pytest.fixture(scope="function")
|
||||
def shopping_lists(database: AllRepositories, unique_user: TestUser):
|
||||
|
||||
models: list[ShoppingListOut] = []
|
||||
|
||||
for _ in range(3):
|
||||
|
@ -46,7 +45,6 @@ def shopping_lists(database: AllRepositories, unique_user: TestUser):
|
|||
|
||||
@pytest.fixture(scope="function")
|
||||
def shopping_list(database: AllRepositories, unique_user: TestUser):
|
||||
|
||||
model = database.group_shopping_lists.create(
|
||||
ShoppingListSave(name=random_string(10), group_id=unique_user.group_id),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue