summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn Paraskevopoulos <jpr@dialectics.space>2019-09-30 13:22:44 +0300
committerIvan Kanakarakis <ivan.kanak@gmail.com>2019-11-26 14:02:27 +0200
commitcc4526867734e40f3e413f309c450bb9033a871b (patch)
treea6caa568dd8138a3b818bedcf89b97fcc20955f1 /tests
parent2109a65b1a233d42da84cc2aad982bf8a4b49816 (diff)
downloadpysaml2-cc4526867734e40f3e413f309c450bb9033a871b.tar.gz
Extract `PYSAML2_DELETE_TMPFILES` option to config.py
- Moves parsing PYSAML2_DELETE_TMPFILES option to config.py and uses the value as a Config class property (`delete_tmpfiles`). This attribute is part of the configuration so its place is in the config.py and the corresponding class. This may add the config object dependency to classes/functions that are calling the `make_temp` function, but at the same time keeps a more layered approach since this config option is now processed and set up in the correct layer; that is the Config class and the config module. Scripts that (in)directly use classes that have methods that use the `make_temp` functions were not changed since those methods are not called when these scripts run and they are out of the scripts' scope (that is, the script functionality does not create any temp file). Those scripts are `verify_metadata`, `merge_metadata` and `mdexport`
Diffstat (limited to 'tests')
-rw-r--r--tests/_test_80_p11_backend.py1
-rw-r--r--tests/test_40_sigver.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/_test_80_p11_backend.py b/tests/_test_80_p11_backend.py
index 218d1897..bdbb4fa6 100644
--- a/tests/_test_80_p11_backend.py
+++ b/tests/_test_80_p11_backend.py
@@ -63,6 +63,7 @@ class FakeConfig():
self.tmp_cert_file = None
self.tmp_key_file = None
self.validate_certificate = False
+ self.delete_tmpfiles = True
class TestPKCS11():
diff --git a/tests/test_40_sigver.py b/tests/test_40_sigver.py
index 89296dc0..07c919b7 100644
--- a/tests/test_40_sigver.py
+++ b/tests/test_40_sigver.py
@@ -128,6 +128,7 @@ class FakeConfig():
tmp_cert_file = None
tmp_key_file = None
validate_certificate = False
+ delete_tmpfiles = True
def getattr(self, attr, default):
return getattr(self, attr, default)