mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-06 05:55:23 +02:00
Refactor/recipe routes (#370)
* format with black * black format * flake8 * remove bar exceptions * remove test for depreciated route * recipe settings editr * add sqlite Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
parent
5dafe8fbb5
commit
1dc051f562
38 changed files with 179 additions and 224 deletions
|
@ -1,6 +1,6 @@
|
|||
from mealie.core.config import app_dirs, settings
|
||||
|
||||
#! I don't like it either!
|
||||
# ! I don't like it either!
|
||||
SQLITE_FILE = app_dirs.SQLITE_DIR.joinpath("test.db")
|
||||
SQLITE_FILE.unlink(missing_ok=True)
|
||||
|
||||
|
|
BIN
tests/data/migrations/chowdown/chowdown-gh-pages.zip
Normal file
BIN
tests/data/migrations/chowdown/chowdown-gh-pages.zip
Normal file
Binary file not shown.
BIN
tests/data/migrations/nextcloud/new_nextcloud.zip
Normal file
BIN
tests/data/migrations/nextcloud/new_nextcloud.zip
Normal file
Binary file not shown.
|
@ -37,7 +37,7 @@ def test_update_group(api_client: TestClient, api_routes: AppRoutes, token):
|
|||
# Test Update
|
||||
response = api_client.put(api_routes.groups_id(2), json=new_data, headers=token)
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
# Validate Changes
|
||||
response = api_client.get(api_routes.groups, headers=token)
|
||||
all_groups = json.loads(response.text)
|
||||
|
|
|
@ -34,11 +34,6 @@ def test_create_no_image(api_client: TestClient, api_routes: AppRoutes, token, r
|
|||
assert json.loads(response.text) == "banana-bread-no-image"
|
||||
|
||||
|
||||
def test_read_all_post(api_client: TestClient, api_routes: AppRoutes):
|
||||
response = api_client.post(api_routes.recipes, json={"properties": ["slug", "description", "rating"]})
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
@pytest.mark.parametrize("recipe_data", recipe_test_data)
|
||||
def test_read_update(api_client: TestClient, api_routes: AppRoutes, recipe_data, token):
|
||||
recipe_url = api_routes.recipes_recipe_slug(recipe_data.expected_slug)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue