mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 13:45:12 +02:00
Ensure Enphase Envoy test fixtures aren't session-scoped (#80499)
* Ensure Enphase Envoy test fixtures aren't session-scoped * Code review
This commit is contained in:
@@ -36,13 +36,13 @@ def config_fixture():
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="gateway_data", scope="session")
|
@pytest.fixture(name="gateway_data", scope="package")
|
||||||
def gateway_data_fixture():
|
def gateway_data_fixture():
|
||||||
"""Define a fixture to return gateway data."""
|
"""Define a fixture to return gateway data."""
|
||||||
return json.loads(load_fixture("data.json", "enphase_envoy"))
|
return json.loads(load_fixture("data.json", "enphase_envoy"))
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="inverters_production_data", scope="session")
|
@pytest.fixture(name="inverters_production_data", scope="package")
|
||||||
def inverters_production_data_fixture():
|
def inverters_production_data_fixture():
|
||||||
"""Define a fixture to return inverter production data."""
|
"""Define a fixture to return inverter production data."""
|
||||||
return json.loads(load_fixture("inverters_production.json", "enphase_envoy"))
|
return json.loads(load_fixture("inverters_production.json", "enphase_envoy"))
|
||||||
|
Reference in New Issue
Block a user