mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00

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
13 lines
354 B
Python
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}"
|