@@ -13,7 +13,6 @@ def clear_env(monkeypatch):
13
13
"""
14
14
monkeypatch .delenv ("HASSIO_RUN_MODE" , raising = False )
15
15
monkeypatch .delenv ("HASSIO_TOKEN" , raising = False )
16
- monkeypatch .delenv ("HOSTNAME" , raising = False )
17
16
monkeypatch .delenv ("SUPERVISOR_TOKEN" , raising = False )
18
17
19
18
def _reload_app_and_config ():
@@ -47,7 +46,7 @@ async def test_no_hassio_env(clear_env):
47
46
app , conf = _reload_app_and_config ()
48
47
assert conf .HASSIO_TOKEN is None
49
48
assert conf .HASSIO_RUN_MODE is None
50
- assert conf .base_path == ""
49
+ assert conf .ingress_path == ""
51
50
52
51
client = TestClient (app )
53
52
@@ -77,7 +76,7 @@ async def test_hassio_run_mode_public(clear_env, monkeypatch):
77
76
app , conf = _reload_app_and_config ()
78
77
assert conf .HASSIO_TOKEN == "token"
79
78
assert conf .HASSIO_RUN_MODE == "public"
80
- assert conf .base_path == ""
79
+ assert conf .ingress_path == ""
81
80
82
81
client = TestClient (app )
83
82
@@ -104,7 +103,6 @@ async def test_hassio_run_mode_ingress(clear_env, monkeypatch):
104
103
custom_ingress = "/hostname/ingress"
105
104
monkeypatch .setenv ("HASSIO_TOKEN" , "token" )
106
105
monkeypatch .setenv ("HASSIO_RUN_MODE" , "ingress" )
107
- monkeypatch .setenv ("HOSTNAME" , "hostname" )
108
106
monkeypatch .setenv ("SUPERVISOR_TOKEN" , "token" )
109
107
110
108
def mock_requests_get (url , headers ):
@@ -118,7 +116,7 @@ def mock_requests_get(url, headers):
118
116
119
117
assert conf .HASSIO_TOKEN == "token"
120
118
assert conf .HASSIO_RUN_MODE == "ingress"
121
- assert conf .base_path == custom_ingress , f"Expected conf.base_path ={ custom_ingress } , got '{ conf .base_path } '"
119
+ assert conf .ingress_path == custom_ingress , f"Expected conf.ingress_path ={ custom_ingress } , got '{ conf .ingress_path } '"
122
120
123
121
client = TestClient (app )
124
122
0 commit comments