summaryrefslogtreecommitdiffstats
path: root/ipatests/test_ipaserver/test_otptoken_import.py
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2014-11-20 18:37:57 +0100
committerPetr Viktorin <pviktori@dhcp-31-13.brq.redhat.com>2014-11-26 13:06:35 +0100
commit792ff0c0c40ddd1583c6789c8f34382c050d3e92 (patch)
treee00b8e239dbce632ce8f027f99063cd588f13fda /ipatests/test_ipaserver/test_otptoken_import.py
parentb3a6701e73f6ccd4dff1dab47554381f42d40bb4 (diff)
downloadfreeipa-792ff0c0c40ddd1583c6789c8f34382c050d3e92.tar.gz
freeipa-792ff0c0c40ddd1583c6789c8f34382c050d3e92.tar.xz
freeipa-792ff0c0c40ddd1583c6789c8f34382c050d3e92.zip
Re-initialize NSS database after otptoken plugin tests
OTP token tests do not properly reinitialize the NSS db, thus making subsequent xmlrpc tests fail on SSL cert validation. Make sure NSS db is re-initalized in the teardown method. https://fedorahosted.org/freeipa/ticket/4748 Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Diffstat (limited to 'ipatests/test_ipaserver/test_otptoken_import.py')
-rw-r--r--ipatests/test_ipaserver/test_otptoken_import.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipatests/test_ipaserver/test_otptoken_import.py b/ipatests/test_ipaserver/test_otptoken_import.py
index 7ee0754da..84df0e2a6 100644
--- a/ipatests/test_ipaserver/test_otptoken_import.py
+++ b/ipatests/test_ipaserver/test_otptoken_import.py
@@ -21,12 +21,17 @@ import os
import sys
import nose
from nss import nss
+from ipalib.x509 import initialize_nss_database
from ipaserver.install.ipa_otptoken_import import PSKCDocument, ValidationError
basename = os.path.join(os.path.dirname(__file__), "data")
class test_otptoken_import(object):
+
+ def teardown(self):
+ initialize_nss_database()
+
def test_figure3(self):
doc = PSKCDocument(os.path.join(basename, "pskc-figure3.xml"))
assert doc.keyname is None