diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-03-18 12:17:35 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-03-18 12:17:35 +0100 |
commit | 6a65ff1ad07911d2ee23a1c6360d2bebdc305b33 (patch) | |
tree | 642ad0f8fdef5d2b35d9e38d2d31c02bbef401f4 | |
parent | 56bd87f0a6bfd07a1939c2e4697725be085d9c59 (diff) | |
download | qutebrowser-6a65ff1ad07911d2ee23a1c6360d2bebdc305b33.tar.gz qutebrowser-6a65ff1ad07911d2ee23a1c6360d2bebdc305b33.zip |
Fix test_flatpak_runtimedir
-rw-r--r-- | tests/unit/utils/test_standarddir.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/unit/utils/test_standarddir.py b/tests/unit/utils/test_standarddir.py index c8a7f47e5..4614373db 100644 --- a/tests/unit/utils/test_standarddir.py +++ b/tests/unit/utils/test_standarddir.py @@ -203,11 +203,15 @@ class TestStandardDir: assert standarddir.runtime() == str(tmpdir_env / APPNAME) def test_flatpak_runtimedir(self, monkeypatch, tmp_path): + runtime_path = tmp_path / 'runtime' + runtime_path.mkdir() + runtime_path.chmod(0o0700) + app_id = 'org.qutebrowser.qutebrowser' - expected = tmp_path / 'app' / app_id + expected = runtime_path / 'app' / app_id monkeypatch.setattr(standarddir.version, 'is_flatpak', lambda: True) - monkeypatch.setenv('XDG_RUNTIME_DIR', str(tmp_path)) + monkeypatch.setenv('XDG_RUNTIME_DIR', str(runtime_path)) monkeypatch.setenv('FLATPAK_ID', app_id) standarddir._init_runtime(args=None) |