We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5777a1 commit eb3557bCopy full SHA for eb3557b
tests/conftest.py
@@ -67,11 +67,11 @@ def enable_all_entities():
67
@pytest.fixture(name="mocked_data")
68
def mocked_data_fixture(request):
69
"""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]
+ json_file = "response.json"
+ fixture = request.node.get_closest_marker("fixture")
+
+ if fixture is not None:
+ json_file = fixture.args[0]
75
76
with patch(
77
"custom_components.knmi.KnmiApiClient.get_response_text",
0 commit comments