dangerzone/tests/test_util.py
deeplow ce57fc0449
move get_resource_path to util.py
static methods that are used application-wide should belong to
the utilities python file.

inspired by @gmarmstrong's PR #166 on refactoring global_common
methods to be static and have a dzutil.py
2022-09-15 09:24:11 +01:00

13 lines
354 B
Python

from pathlib import Path
import dangerzone.util as util
VERSION_FILE_NAME = "version.txt"
def test_get_resource_path():
share_dir = Path("share").resolve()
resource_path = Path(util.get_resource_path(VERSION_FILE_NAME)).parent
assert share_dir.samefile(
resource_path
), f"{share_dir} is not the same file as {resource_path}"