Fix common.get_tor_paths test

This commit is contained in:
Micah Lee 2020-04-06 21:19:17 -07:00
parent 2ad8b167ba
commit 40b43b66ab
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
3 changed files with 12 additions and 8 deletions

View File

@ -36,7 +36,7 @@ jobs:
name: Install dependencies name: Install dependencies
command: | command: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y python3-pip xvfb sudo apt-get install -y python3-pip xvfb tor obfs4proxy
sudo pip3 install poetry flake8 sudo pip3 install poetry flake8
poetry install poetry install

View File

@ -32,7 +32,7 @@ cd onionshare
The recommended way to develop OnionShare is to use the latest versions of all dependencies. The recommended way to develop OnionShare is to use the latest versions of all dependencies.
First, install `tor` from either the [official Debian repository](https://support.torproject.org/apt/tor-deb-repo/), or from your package manager. First, install `tor` and `obfs4proxy` from either the [official Debian repository](https://support.torproject.org/apt/tor-deb-repo/), or from your package manager.
Then download Qt 5.14.0 for Linux: Then download Qt 5.14.0 for Linux:

View File

@ -227,12 +227,16 @@ class TestGetTorPaths:
# @pytest.mark.skipif(sys.platform != 'Linux', reason='requires Linux') ? # @pytest.mark.skipif(sys.platform != 'Linux', reason='requires Linux') ?
def test_get_tor_paths_linux(self, platform_linux, common_obj): def test_get_tor_paths_linux(self, platform_linux, common_obj):
assert common_obj.get_tor_paths() == ( (
"/usr/bin/tor", tor_path,
"/usr/share/tor/geoip", tor_geo_ip_file_path,
"/usr/share/tor/geoip6", tor_geo_ipv6_file_path,
"/usr/bin/obfs4proxy", _, # 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') ? # @pytest.mark.skipif(sys.platform != 'Windows', reason='requires Windows') ?
def test_get_tor_paths_windows(self, platform_windows, common_obj, sys_frozen): def test_get_tor_paths_windows(self, platform_windows, common_obj, sys_frozen):