1
0
mirror of https://github.com/laurivosandi/certidude synced 2025-09-10 07:21:05 +00:00

Add basic tests for CA

This commit is contained in:
2015-10-09 10:46:40 +03:00
parent 244919ba92
commit 9a845fc009
3 changed files with 26 additions and 8 deletions

View File

@@ -123,12 +123,7 @@ class CertificateAuthorityConfig(object):
"""
Returns sorted list of CA-s defined in the configuration file.
"""
l = [s[3:] for s in self._config if s.startswith("CA_")]
# Sanity check for duplicates (although ConfigParser fails earlier)
if len(l) != len(set(l)):
raise ValueError
return sorted(l)
return sorted([s[3:] for s in self._config if s.startswith("CA_")])
def pop_certificate_authority(self):
def wrapper(func):