Skip to content

Commit eb3557b

Browse files
committed
Optimize fixture
1 parent b5777a1 commit eb3557b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/conftest.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ def enable_all_entities():
6767
@pytest.fixture(name="mocked_data")
6868
def mocked_data_fixture(request):
6969
"""Use mocked data in the integration"""
70-
json_file = request.node.get_closest_marker("fixture")
71-
if json_file is None:
72-
json_file = "response.json"
73-
else:
74-
json_file = json_file.args[0]
70+
json_file = "response.json"
71+
fixture = request.node.get_closest_marker("fixture")
72+
73+
if fixture is not None:
74+
json_file = fixture.args[0]
7575

7676
with patch(
7777
"custom_components.knmi.KnmiApiClient.get_response_text",

0 commit comments

Comments
 (0)