Skip to content

Commit

Permalink
Optimize fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
golles committed Apr 19, 2024
1 parent b5777a1 commit eb3557b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ def enable_all_entities():
@pytest.fixture(name="mocked_data")
def mocked_data_fixture(request):
"""Use mocked data in the integration"""
json_file = request.node.get_closest_marker("fixture")
if json_file is None:
json_file = "response.json"
else:
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]

with patch(
"custom_components.knmi.KnmiApiClient.get_response_text",
Expand Down

0 comments on commit eb3557b

Please sign in to comment.