Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
IceBotYT committed Aug 27, 2024
1 parent 3fe21e3 commit 9f5ec5e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/components/nice_go/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Common fixtures for the Nice G.O. tests."""

from collections.abc import Generator
from datetime import datetime
from unittest.mock import AsyncMock, patch

from nice_go import Barrier, BarrierState, ConnectionState
Expand Down Expand Up @@ -71,7 +72,7 @@ def mock_config_entry() -> MockConfigEntry:
CONF_EMAIL: "test-email",
CONF_PASSWORD: "test-password",
CONF_REFRESH_TOKEN: "test-refresh-token",
CONF_REFRESH_TOKEN_CREATION_TIME: 1722184160.738171,
CONF_REFRESH_TOKEN_CREATION_TIME: datetime.now().timestamp(),
},
version=1,
unique_id="test-email",
Expand Down
2 changes: 1 addition & 1 deletion tests/components/nice_go/snapshots/test_diagnostics.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
'email': '**REDACTED**',
'password': '**REDACTED**',
'refresh_token': '**REDACTED**',
'refresh_token_creation_time': 1722184160.738171,
'refresh_token_creation_time': 1724716800.0,
}),
'disabled_by': None,
'domain': 'nice_go',
Expand Down
2 changes: 2 additions & 0 deletions tests/components/nice_go/test_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from unittest.mock import AsyncMock

import pytest
from syrupy import SnapshotAssertion
from syrupy.filters import props

Expand All @@ -14,6 +15,7 @@
from tests.typing import ClientSessionGenerator


@pytest.mark.freeze_time("2024-08-27")
async def test_entry_diagnostics(
hass: HomeAssistant,
hass_client: ClientSessionGenerator,
Expand Down

0 comments on commit 9f5ec5e

Please sign in to comment.