update flake8-pytest-style-plugin

This commit is contained in:
Kenneth Kehl
2024-07-15 08:07:18 -07:00
parent 437f8ca400
commit 8489fb9e61
17 changed files with 232 additions and 232 deletions

View File

@@ -8,17 +8,17 @@ from freezegun import freeze_time
from notifications_utils.clients.redis.redis_client import RedisClient, prepare_value
@pytest.fixture()
@pytest.fixture
def mocked_redis_pipeline():
return Mock()
@pytest.fixture()
@pytest.fixture
def delete_mock():
return Mock(return_value=4)
@pytest.fixture()
@pytest.fixture
def mocked_redis_client(app, mocked_redis_pipeline, delete_mock, mocker):
app.config["REDIS_ENABLED"] = True
@@ -46,7 +46,7 @@ def mocked_redis_client(app, mocked_redis_pipeline, delete_mock, mocker):
return redis_client
@pytest.fixture()
@pytest.fixture
def failing_redis_client(mocked_redis_client, delete_mock):
# nota bene: using KeyError because flake8 thinks Exception
# and BaseException are too broad

View File

@@ -4,7 +4,7 @@ from notifications_utils.clients.redis import RequestCache
from notifications_utils.clients.redis.redis_client import RedisClient
@pytest.fixture()
@pytest.fixture
def mocked_redis_client(app):
app.config["REDIS_ENABLED"] = True
redis_client = RedisClient()
@@ -12,7 +12,7 @@ def mocked_redis_client(app):
return redis_client
@pytest.fixture()
@pytest.fixture
def cache(mocked_redis_client):
return RequestCache(mocked_redis_client)