diff options
author | Micah Lee <micah@micahflee.com> | 2020-04-06 21:19:17 -0700 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2020-04-06 21:19:17 -0700 |
commit | 40b43b66ab788c60fe3753f9c44207e360ff8fad (patch) | |
tree | 7c8cfa6bb5840bc2d6228182b4ddb94770c8850a /tests | |
parent | 2ad8b167ba50a301d8515c3f0bd0e379fc4fc7af (diff) | |
download | onionshare-40b43b66ab788c60fe3753f9c44207e360ff8fad.tar.gz onionshare-40b43b66ab788c60fe3753f9c44207e360ff8fad.zip |
Fix common.get_tor_paths test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_cli_common.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/test_cli_common.py b/tests/test_cli_common.py index 1f230295..3592d1ba 100644 --- a/tests/test_cli_common.py +++ b/tests/test_cli_common.py @@ -227,12 +227,16 @@ class TestGetTorPaths: # @pytest.mark.skipif(sys.platform != 'Linux', reason='requires Linux') ? def test_get_tor_paths_linux(self, platform_linux, common_obj): - assert common_obj.get_tor_paths() == ( - "/usr/bin/tor", - "/usr/share/tor/geoip", - "/usr/share/tor/geoip6", - "/usr/bin/obfs4proxy", - ) + ( + tor_path, + tor_geo_ip_file_path, + tor_geo_ipv6_file_path, + _, # obfs4proxy is optional + ) = common_obj.get_tor_paths() + + assert os.path.basename(tor_path) == "tor" + assert tor_geo_ip_file_path == "/usr/share/tor/geoip" + assert tor_geo_ipv6_file_path == "/usr/share/tor/geoip6" # @pytest.mark.skipif(sys.platform != 'Windows', reason='requires Windows') ? def test_get_tor_paths_windows(self, platform_windows, common_obj, sys_frozen): |