aboutsummaryrefslogtreecommitdiff
path: root/test/misc_constants.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/misc_constants.py')
-rw-r--r--test/misc_constants.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/misc_constants.py b/test/misc_constants.py
index 22432a6..55ee13e 100644
--- a/test/misc_constants.py
+++ b/test/misc_constants.py
@@ -41,6 +41,29 @@ default_proxy_port = 1337
default_cert_dir = here / 'certs'
+# Use user-specified values instead where available
+try:
+ with open(str(here.parent / 'testing.conf')) as f:
+ option = f.readline()
+ while ' ' in option:
+ key, value = option[:-1].split(' ', maxsplit=1)
+ if key == 'BINARY':
+ default_firefox_binary = value
+
+ elif key == 'TEST_PROFILE':
+ default_clean_profile_dir = value
+
+ elif key == 'TEST_PORT':
+ default_proxy_port = value
+
+ else:
+ raise KeyError(key)
+
+ option = f.readline()
+except FileNotFoundError:
+ # There may be no defaults overridden; that's OK!
+ pass
+
mime_types = {
"7z": "application/x-7z-compressed", "oga": "audio/ogg",
"abw": "application/x-abiword", "ogv": "video/ogg",