mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-05 21:45:25 +02:00
chore(deps): update dependency ruff to ^0.9.0 (#4871)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com> Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
This commit is contained in:
parent
ea0bec2336
commit
2c2de1e95b
22 changed files with 124 additions and 138 deletions
|
@ -1,4 +1,4 @@
|
|||
from datetime import datetime, timezone
|
||||
from datetime import UTC, datetime
|
||||
from uuid import uuid4
|
||||
|
||||
import pytest
|
||||
|
@ -7,7 +7,7 @@ from mealie.schema.meal_plan.new_meal import CreatePlanEntry
|
|||
|
||||
|
||||
def test_create_plan_with_title():
|
||||
entry = CreatePlanEntry(date=datetime.now(timezone.utc).date(), title="Test Title")
|
||||
entry = CreatePlanEntry(date=datetime.now(UTC).date(), title="Test Title")
|
||||
|
||||
assert entry.title == "Test Title"
|
||||
assert entry.recipe_id is None
|
||||
|
@ -15,7 +15,7 @@ def test_create_plan_with_title():
|
|||
|
||||
def test_create_plan_with_slug():
|
||||
uuid = uuid4()
|
||||
entry = CreatePlanEntry(date=datetime.now(timezone.utc).date(), recipe_id=uuid)
|
||||
entry = CreatePlanEntry(date=datetime.now(UTC).date(), recipe_id=uuid)
|
||||
|
||||
assert entry.recipe_id == uuid
|
||||
assert entry.title == ""
|
||||
|
@ -23,4 +23,4 @@ def test_create_plan_with_slug():
|
|||
|
||||
def test_slug_or_title_validation():
|
||||
with pytest.raises(ValueError):
|
||||
CreatePlanEntry(date=datetime.now(timezone.utc).date(), slug="", title="")
|
||||
CreatePlanEntry(date=datetime.now(UTC).date(), slug="", title="")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue