Fix CLI tests

This commit is contained in:
Micah Lee 2021-10-15 09:21:58 -07:00
parent 2ffd15ae82
commit 64973a00ec
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
2 changed files with 11 additions and 1 deletions

View File

@ -162,11 +162,15 @@ class TestGetTorPaths:
tor_geo_ip_file_path = os.path.join(base_path, "Resources", "Tor", "geoip")
tor_geo_ipv6_file_path = os.path.join(base_path, "Resources", "Tor", "geoip6")
obfs4proxy_file_path = os.path.join(base_path, "Resources", "Tor", "obfs4proxy")
snowflake_file_path = os.path.join(
base_path, "Resources", "Tor", "snowflake-client"
)
assert common_obj.get_tor_paths() == (
tor_path,
tor_geo_ip_file_path,
tor_geo_ipv6_file_path,
obfs4proxy_file_path,
snowflake_file_path,
)
@pytest.mark.skipif(sys.platform != "linux", reason="requires Linux")
@ -176,6 +180,7 @@ class TestGetTorPaths:
tor_geo_ip_file_path,
tor_geo_ipv6_file_path,
_, # obfs4proxy is optional
_, # snowflake-client is optional
) = common_obj.get_tor_paths()
assert os.path.basename(tor_path) == "tor"
@ -199,6 +204,9 @@ class TestGetTorPaths:
obfs4proxy_file_path = os.path.join(
os.path.join(base_path, "Tor"), "obfs4proxy.exe"
)
snowflake_file_path = os.path.join(
os.path.join(base_path, "Tor"), "snowflake-client.exe"
)
tor_geo_ip_file_path = os.path.join(
os.path.join(os.path.join(base_path, "Data"), "Tor"), "geoip"
)
@ -210,6 +218,7 @@ class TestGetTorPaths:
tor_geo_ip_file_path,
tor_geo_ipv6_file_path,
obfs4proxy_file_path,
snowflake_file_path,
)

View File

@ -32,9 +32,10 @@ class TestSettings:
"no_bridges": True,
"tor_bridges_use_obfs4": False,
"tor_bridges_use_meek_lite_azure": False,
"tor_bridges_use_snowflake": False,
"tor_bridges_use_custom_bridges": "",
"persistent_tabs": [],
"theme":0
"theme": 0,
}
for key in settings_obj._settings:
# Skip locale, it will not always default to the same thing