[damned-lies] chore: define LOCK_DIR in test settings
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] chore: define LOCK_DIR in test settings
- Date: Mon, 3 May 2021 18:42:09 +0000 (UTC)
commit 824b920f9aa079283298f6aa683d9bfb2466ebcd
Author: Guillaume Bernard <associations guillaume-bernard fr>
Date: Mon May 3 20:24:52 2021 +0200
chore: define LOCK_DIR in test settings
On some systems, the default value of LOCK_DIR is unreachable for
security reasons. Using a temporary and auto-generated directory
when running tests fixes the issue.
damnedlies/settings_tests.py | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/damnedlies/settings_tests.py b/damnedlies/settings_tests.py
index 702e3d94..a19dc80a 100644
--- a/damnedlies/settings_tests.py
+++ b/damnedlies/settings_tests.py
@@ -1,3 +1,5 @@
+import tempfile
+
from .settings import *
SECRET_KEY = 'shRc(?sk+sW3Wqn-lBvs=r52a@#hgC9g'
@@ -5,3 +7,5 @@ SECRET_KEY = 'shRc(?sk+sW3Wqn-lBvs=r52a@#hgC9g'
SCRATCHDIR = BASE_DIR / 'scratch'
POTDIR = SCRATCHDIR / 'POT'
GETTEXT_ITS_DATA = {}
+
+LOCK_DIR = Path(tempfile.mkdtemp())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]