Fix tests for paths on mac

This commit is contained in:
Manuel Cortez 2022-02-23 11:20:00 -06:00
parent 01b81bd8d7
commit 5009009363
No known key found for this signature in database
GPG Key ID: 9E0735CA15EFE790

View File

@ -45,7 +45,9 @@ def test_app_path():
old_value = paths.is_mac
paths.is_mac = True
sys.frozen = True
mac_result = paths.app_path()
assert mac_result == os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "..", "..", "..", ".."))
with mock.patch("updater.paths.executable_directory", return_value="/path/to/content/resources"):
mac_result = paths.app_path()
assert mac_result == os.path.abspath(os.path.join("/path", "to"))
paths.is_mac = old_value
del sys.frozen