Skip to content

Commit 3ce2f56

Browse files
committed
Downgrade time-machine module
1 parent 43b602c commit 3ce2f56

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

requirements-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ coverage[toml] >=6.2,<8.0
55
mypy ==1.14.1
66
ruff ==0.13.0
77
respx ==0.22.0
8-
time-machine ==2.19.0
8+
time-machine ==2.15.0

tests/test_api_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,14 @@ def test_stream_build_logs_connection_closed_without_complete_failed_or_timeout(
346346

347347

348348
@api_mock
349-
@pytest.mark.time_machine("2025-11-01 13:00:00", tick=False)
350349
def test_stream_build_logs_retry_timeout(
351350
logs_route: respx.Route,
352351
client: APIClient,
353352
time_machine: TimeMachineFixture,
354353
deployment_id: str,
355354
) -> None:
355+
time_machine.move_to("2025-11-01 13:00:00", tick=False)
356+
356357
def responses(request: httpx.Request, route: respx.Route) -> Response:
357358
time_machine.shift(timedelta(hours=1))
358359

tests/test_cli_deploy.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import random
22
import string
3-
from datetime import datetime, timedelta
3+
from datetime import timedelta
44
from pathlib import Path
55
from typing import Dict, Optional
66
from unittest.mock import patch
@@ -875,14 +875,14 @@ def test_shows_error_message_when_build_log_streaming_fails(
875875

876876

877877
@pytest.mark.respx(base_url=settings.base_api_url)
878-
@pytest.mark.time_machine(datetime(2025, 11, 1), tick=False)
879878
@patch("fastapi_cloud_cli.commands.deploy.WAITING_MESSAGES", ["short wait message"])
880879
def test_short_wait_messages(
881880
logged_in_cli: None,
882881
tmp_path: Path,
883882
respx_mock: respx.MockRouter,
884883
time_machine: TimeMachineFixture,
885884
) -> None:
885+
time_machine.move_to("2025-11-01 13:00:00", tick=False)
886886
app_data = _get_random_app()
887887
team_data = _get_random_team()
888888
app_id = app_data["id"]
@@ -942,14 +942,15 @@ def build_logs_handler(request: httpx.Request, route: respx.Route) -> Response:
942942

943943

944944
@pytest.mark.respx(base_url=settings.base_api_url)
945-
@pytest.mark.time_machine(datetime(2025, 11, 1), tick=False)
946945
@patch("fastapi_cloud_cli.commands.deploy.LONG_WAIT_MESSAGES", ["long wait message"])
947946
def test_long_wait_messages(
948947
logged_in_cli: None,
949948
tmp_path: Path,
950949
respx_mock: respx.MockRouter,
951950
time_machine: TimeMachineFixture,
952951
) -> None:
952+
time_machine.move_to("2025-11-01 13:00:00", tick=False)
953+
953954
app_data = _get_random_app()
954955
team_data = _get_random_team()
955956
app_id = app_data["id"]

0 commit comments

Comments
 (0)