mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-01 19:45:22 +02:00
Feature/migration-rewrite (#278)
* start * migration rewrite * update name * convert chowdown to new methods * refactor/remove duplicate code * refactor to unify logger + log to file * remove toolbox * Display report on UI Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
parent
ed49eb7e80
commit
42deb5ad10
30 changed files with 590 additions and 255 deletions
|
@ -9,7 +9,6 @@ from tests.app_routes import AppRoutes
|
|||
from tests.test_config import TEST_CHOWDOWN_DIR, TEST_NEXTCLOUD_DIR
|
||||
|
||||
|
||||
# Chowdown
|
||||
@pytest.fixture(scope="session")
|
||||
def chowdown_zip():
|
||||
zip = TEST_CHOWDOWN_DIR.joinpath("test_chowdown-gh-pages.zip")
|
||||
|
@ -42,14 +41,10 @@ def test_import_chowdown_directory(api_client: TestClient, api_routes: AppRoutes
|
|||
|
||||
assert response.status_code == 200
|
||||
|
||||
report = json.loads(response.content)
|
||||
assert report["failed"] == []
|
||||
reports = json.loads(response.content)
|
||||
|
||||
expected_slug = "roasted-okra"
|
||||
|
||||
recipe_url = api_routes.recipes_recipe_slug(expected_slug)
|
||||
response = api_client.get(recipe_url)
|
||||
assert response.status_code == 200
|
||||
for report in reports:
|
||||
assert report.get("status") is True
|
||||
|
||||
|
||||
def test_delete_chowdown_migration_data(api_client: TestClient, api_routes: AppRoutes, chowdown_zip: Path, token):
|
||||
|
@ -91,13 +86,9 @@ def test_import_nextcloud_directory(api_client: TestClient, api_routes: AppRoute
|
|||
|
||||
assert response.status_code == 200
|
||||
|
||||
report = json.loads(response.content)
|
||||
assert report["failed"] == []
|
||||
|
||||
expected_slug = "air-fryer-shrimp"
|
||||
recipe_url = api_routes.recipes_recipe_slug(expected_slug)
|
||||
response = api_client.get(recipe_url)
|
||||
assert response.status_code == 200
|
||||
reports = json.loads(response.content)
|
||||
for report in reports:
|
||||
assert report.get("status") is True
|
||||
|
||||
|
||||
def test_delete__nextcloud_migration_data(api_client: TestClient, api_routes: AppRoutes, nextcloud_zip: Path, token):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue