mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-27 08:14:30 -04:00
feat: Add recipekeeper migration (#3642)
This commit is contained in:
committed by
GitHub
parent
a7fcb6c84d
commit
f4f2b863e0
@@ -38,6 +38,8 @@ migrations_plantoeat = CWD / "migrations/plantoeat.zip"
|
||||
|
||||
migrations_myrecipebox = CWD / "migrations/myrecipebox.csv"
|
||||
|
||||
migrations_recipekeeper = CWD / "migrations/recipekeeper.zip"
|
||||
|
||||
images_test_image_1 = CWD / "images/test-image-1.jpg"
|
||||
|
||||
images_test_image_2 = CWD / "images/test-image-2.png"
|
||||
|
||||
BIN
tests/data/migrations/recipekeeper.zip
Normal file
BIN
tests/data/migrations/recipekeeper.zip
Normal file
Binary file not shown.
@@ -30,6 +30,7 @@ test_cases = [
|
||||
MigrationTestData(typ=SupportedMigrations.tandoor, archive=test_data.migrations_tandoor),
|
||||
MigrationTestData(typ=SupportedMigrations.plantoeat, archive=test_data.migrations_plantoeat),
|
||||
MigrationTestData(typ=SupportedMigrations.myrecipebox, archive=test_data.migrations_myrecipebox),
|
||||
MigrationTestData(typ=SupportedMigrations.recipekeeper, archive=test_data.migrations_recipekeeper),
|
||||
]
|
||||
|
||||
test_ids = [
|
||||
@@ -41,6 +42,7 @@ test_ids = [
|
||||
"tandoor_archive",
|
||||
"plantoeat_archive",
|
||||
"myrecipebox_csv",
|
||||
"recipekeeper_archive",
|
||||
]
|
||||
|
||||
|
||||
@@ -55,7 +57,10 @@ def test_recipe_migration(api_client: TestClient, unique_user: TestUser, mig: Mi
|
||||
}
|
||||
|
||||
response = api_client.post(
|
||||
api_routes.groups_migrations, data=payload, files=file_payload, headers=unique_user.token
|
||||
api_routes.groups_migrations,
|
||||
data=payload,
|
||||
files=file_payload,
|
||||
headers=unique_user.token,
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
@@ -117,7 +122,10 @@ def test_bad_mealie_alpha_data_is_ignored(api_client: TestClient, unique_user: T
|
||||
}
|
||||
|
||||
response = api_client.post(
|
||||
api_routes.groups_migrations, data=payload, files=file_payload, headers=unique_user.token
|
||||
api_routes.groups_migrations,
|
||||
data=payload,
|
||||
files=file_payload,
|
||||
headers=unique_user.token,
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
|
||||
Reference in New Issue
Block a user