12
12
_LOGGER = logging .getLogger (__name__ )
13
13
14
14
15
- @pytest .fixture (name = "pyscript_bypass_setup" )
15
+ @pytest .fixture (name = "pyscript_bypass_setup" , autouse = True )
16
16
def pyscript_bypass_setup_fixture ():
17
17
"""Mock component setup."""
18
18
with patch ("custom_components.pyscript.async_setup_entry" , return_value = True ):
19
19
yield
20
20
21
21
22
- async def test_user_flow_minimum_fields (hass , pyscript_bypass_setup ):
22
+ async def test_user_flow_minimum_fields (hass ):
23
23
"""Test user config flow with minimum fields."""
24
24
# test form shows
25
25
result = await hass .config_entries .flow .async_init (DOMAIN , context = {"source" : SOURCE_USER })
@@ -33,7 +33,7 @@ async def test_user_flow_minimum_fields(hass, pyscript_bypass_setup):
33
33
assert not result ["data" ][CONF_ALLOW_ALL_IMPORTS ]
34
34
35
35
36
- async def test_user_flow_all_fields (hass , pyscript_bypass_setup ,) -> None :
36
+ async def test_user_flow_all_fields (hass ) :
37
37
"""Test user config flow with all fields."""
38
38
# test form shows
39
39
result = await hass .config_entries .flow .async_init (DOMAIN , context = {"source" : SOURCE_USER })
@@ -50,7 +50,7 @@ async def test_user_flow_all_fields(hass, pyscript_bypass_setup,) -> None:
50
50
assert result ["data" ][CONF_ALLOW_ALL_IMPORTS ]
51
51
52
52
53
- async def test_user_already_configured (hass , pyscript_bypass_setup ,) -> None :
53
+ async def test_user_already_configured (hass ) :
54
54
"""Test service is already configured during user setup."""
55
55
result = await hass .config_entries .flow .async_init (
56
56
DOMAIN , context = {"source" : SOURCE_USER }, data = {CONF_ALLOW_ALL_IMPORTS : True }
@@ -75,7 +75,7 @@ async def test_import_flow(hass, pyscript_bypass_setup):
75
75
assert result ["type" ] == data_entry_flow .RESULT_TYPE_CREATE_ENTRY
76
76
77
77
78
- async def test_import_flow_update_entry (hass , pyscript_bypass_setup ):
78
+ async def test_import_flow_update_entry (hass ):
79
79
"""Test import config flow updates existing entry."""
80
80
result = await hass .config_entries .flow .async_init (
81
81
DOMAIN , context = {"source" : SOURCE_IMPORT }, data = PYSCRIPT_SCHEMA ({})
@@ -91,7 +91,7 @@ async def test_import_flow_update_entry(hass, pyscript_bypass_setup):
91
91
assert result ["reason" ] == "updated_entry"
92
92
93
93
94
- async def test_import_flow_no_update (hass , pyscript_bypass_setup ):
94
+ async def test_import_flow_no_update (hass ):
95
95
"""Test import config flow doesn't update existing entry when data is same."""
96
96
result = await hass .config_entries .flow .async_init (
97
97
DOMAIN , context = {"source" : SOURCE_IMPORT }, data = PYSCRIPT_SCHEMA ({})
0 commit comments