fix: unify completed item visibility
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from datetime import UTC, date, datetime, timedelta
|
||||
from datetime import date, timedelta
|
||||
|
||||
from tests.test_mvp_backend import boot
|
||||
from tests.test_mvp_backend import boot, local_today
|
||||
|
||||
|
||||
def create_habit(client, **overrides):
|
||||
@@ -97,7 +97,7 @@ def test_habit_update_rejects_non_finite_numeric_target_and_max_value(client):
|
||||
def test_habit_log_post_rejects_non_finite_value(client):
|
||||
boot(client)
|
||||
habit = create_habit(client).json()
|
||||
day = datetime.now(UTC).date().isoformat()
|
||||
day = local_today().isoformat()
|
||||
|
||||
for value in ("NaN", "Infinity", "-Infinity"):
|
||||
response = client.post(
|
||||
@@ -110,7 +110,7 @@ def test_habit_log_post_rejects_non_finite_value(client):
|
||||
def test_habit_log_put_rejects_non_finite_value(client):
|
||||
boot(client)
|
||||
habit = create_habit(client).json()
|
||||
day = datetime.now(UTC).date().isoformat()
|
||||
day = local_today().isoformat()
|
||||
|
||||
for value in ("NaN", "Infinity", "-Infinity"):
|
||||
response = client.put(
|
||||
@@ -147,7 +147,7 @@ def test_archived_habit_rejects_edit_logs_pause_and_active_permanent_delete(clie
|
||||
|
||||
habit = create_habit(client).json()
|
||||
hid = habit["id"]
|
||||
day = datetime.now(UTC).date().isoformat()
|
||||
day = local_today().isoformat()
|
||||
assert client.put(f"/api/v1/habits/{hid}/logs/{day}", json={"value": 1}).status_code == 200
|
||||
assert client.delete(f"/api/v1/habits/{hid}").status_code == 204
|
||||
|
||||
|
||||
Reference in New Issue
Block a user