Update tests
This commit is contained in:
parent
3ccd112e44
commit
0afd6cfcbb
@ -141,7 +141,17 @@ def resolve_ip_address(host):
|
||||
|
||||
|
||||
def get_bool_env(var, default=False):
|
||||
return os.getenv(var, default) in ["1", "true", "True", "TRUE", "yes", "Yes", "YES"]
|
||||
return os.getenv(var, default) in [
|
||||
True,
|
||||
1,
|
||||
"1",
|
||||
"true",
|
||||
"True",
|
||||
"TRUE",
|
||||
"yes",
|
||||
"Yes",
|
||||
"YES",
|
||||
]
|
||||
|
||||
|
||||
def is_ha_addon():
|
||||
|
@ -109,7 +109,7 @@ def test_is_ip_address__valid(value):
|
||||
("FOO", None, True, True),
|
||||
("FOO", "", False, False),
|
||||
("FOO", "Yes", False, True),
|
||||
("FOO", "123", False, True),
|
||||
("FOO", "1", False, True),
|
||||
),
|
||||
)
|
||||
def test_get_bool_env(monkeypatch, var, value, default, expected):
|
||||
|
Loading…
x
Reference in New Issue
Block a user