Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Apr 10, 2024
1 parent d1e663d commit fd0213c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import json
import logging
import os
import freezegun
import shutil
from typing import Any, Generator
from unittest.mock import MagicMock, patch

from awesomeversion import AwesomeVersion
import freezegun
from homeassistant import loader
from homeassistant.auth.models import Credentials
from homeassistant.auth.providers.homeassistant import HassAuthProvider
Expand Down Expand Up @@ -83,6 +83,7 @@ def time_freezer():
with freezegun.freeze_time("2019-02-26T15:02:39Z"):
yield


@pytest.fixture(autouse=True)
def set_request_context(request: pytest.FixtureRequest):
"""Set request context for every test."""
Expand Down
4 changes: 2 additions & 2 deletions tests/patch_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
from __future__ import annotations

import datetime
import freezegun

import freezegun
from homeassistant import util
from homeassistant.util import dt as dt_util


class CustomFakeDatetime(freezegun.api.FakeDatetime): # type: ignore[name-defined]
"""Modified to workaround tz problem."""

Expand All @@ -23,4 +24,3 @@ def _utcnow() -> datetime.datetime:
dt_util.utcnow = _utcnow # type: ignore[assignment]
util.utcnow = _utcnow # type: ignore[assignment]
freezegun.api.FakeDatetime = CustomFakeDatetime

0 comments on commit fd0213c

Please sign in to comment.