Add type hints for FixtureRequest in tests (#118779)
This commit is contained in:
parent
16fd19f01a
commit
b54a68750b
27 changed files with 67 additions and 36 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Generator
|
||||
from dataclasses import dataclass
|
||||
from datetime import timedelta
|
||||
from http import HTTPStatus
|
||||
|
@ -79,7 +80,9 @@ class Table:
|
|||
|
||||
|
||||
@pytest.fixture(name="mock_client")
|
||||
def mock_client_fixture(request):
|
||||
def mock_client_fixture(
|
||||
request: pytest.FixtureRequest,
|
||||
) -> Generator[MagicMock, None, None]:
|
||||
"""Patch the InfluxDBClient object with mock for version under test."""
|
||||
if request.param == API_VERSION_2:
|
||||
client_target = f"{INFLUXDB_CLIENT_PATH}V2"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue