summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2020-11-08 14:51:45 -0800
committerMicah Lee <micah@micahflee.com>2020-11-08 14:51:45 -0800
commit0d20cf2fec8c021698a8e803b056e0a2725e7001 (patch)
tree4bd2a8ff11cd357d0640c4afeb072c993f53b958
parent52337cdc138ce3fcde2cbd088433833c3638fb78 (diff)
downloadonionshare-0d20cf2fec8c021698a8e803b056e0a2725e7001.tar.gz
onionshare-0d20cf2fec8c021698a8e803b056e0a2725e7001.zip
Remove obsolete resource path tests
-rw-r--r--cli/tests/test_cli_common.py32
1 files changed, 2 insertions, 30 deletions
diff --git a/cli/tests/test_cli_common.py b/cli/tests/test_cli_common.py
index b60d22d7..e95ba03e 100644
--- a/cli/tests/test_cli_common.py
+++ b/cli/tests/test_cli_common.py
@@ -38,7 +38,7 @@ class TestBuildPassword:
),
)
def test_build_password_regex(self, test_input, expected):
- """ Test that `PASSWORD_REGEX` accounts for the following patterns
+ """Test that `PASSWORD_REGEX` accounts for the following patterns
There are a few hyphenated words in `wordlist.txt`:
* drop-down
@@ -61,7 +61,7 @@ class TestBuildPassword:
class TestDirSize:
def test_temp_dir_size(self, common_obj, temp_dir_1024_delete):
- """ dir_size() should return the total size (in bytes) of all files
+ """dir_size() should return the total size (in bytes) of all files
in a particular directory.
"""
@@ -152,34 +152,6 @@ class TestGetPlatform:
assert common_obj.platform == "Windows"
-# TODO: double-check these tests
-class TestGetResourcePath:
- def test_onionshare_dev_mode(self, common_obj, sys_onionshare_dev_mode):
- prefix = os.path.join(
- os.path.dirname(
- os.path.dirname(
- os.path.abspath(inspect.getfile(inspect.currentframe()))
- )
- ),
- "share",
- )
- assert common_obj.get_resource_path(
- os.path.join(prefix, "test_filename")
- ) == os.path.join(prefix, "test_filename")
-
- def test_linux(self, common_obj, platform_linux, sys_argv_sys_prefix):
- prefix = os.path.join(sys.prefix, "share", "onionshare")
- assert common_obj.get_resource_path(
- os.path.join(prefix, "test_filename")
- ) == os.path.join(prefix, "test_filename")
-
- def test_frozen_darwin(self, common_obj, platform_darwin, sys_frozen, sys_meipass):
- prefix = os.path.join(sys._MEIPASS, "share")
- assert common_obj.get_resource_path(
- os.path.join(prefix, "test_filename")
- ) == os.path.join(prefix, "test_filename")
-
-
class TestGetTorPaths:
@pytest.mark.skipif(sys.platform != "Darwin", reason="requires MacOS")
def test_get_tor_paths_darwin(