summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-03-18 12:17:35 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-03-18 12:20:09 +0100
commit3f079ef0378a7829387a222b6c081f12fbdf092a (patch)
tree78ece75b1834576a98b06494d8fde719d392a058
parent0a3f3a2f981d4ed8b47ba9cafe0d4647dc1d940e (diff)
downloadqutebrowser-3f079ef0378a7829387a222b6c081f12fbdf092a.tar.gz
qutebrowser-3f079ef0378a7829387a222b6c081f12fbdf092a.zip
Fix test_flatpak_runtimedir
(cherry picked from commit 6a65ff1ad07911d2ee23a1c6360d2bebdc305b33)
-rw-r--r--tests/unit/utils/test_standarddir.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/unit/utils/test_standarddir.py b/tests/unit/utils/test_standarddir.py
index 6da33fe82..ca0743716 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(version, 'is_sandboxed', 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)