diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_xmlrpc/test_host_plugin.py | 5 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_service_plugin.py | 3 | ||||
-rw-r--r-- | tests/test_xmlrpc/xmlrpc_test.py | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_host_plugin.py b/tests/test_xmlrpc/test_host_plugin.py index 4f24b6e39..7068d9a3f 100644 --- a/tests/test_xmlrpc/test_host_plugin.py +++ b/tests/test_xmlrpc/test_host_plugin.py @@ -26,6 +26,7 @@ from ipalib import api, errors, x509 from ipalib.dn import * from tests.test_xmlrpc.xmlrpc_test import Declarative, fuzzy_uuid, fuzzy_digits from tests.test_xmlrpc.xmlrpc_test import fuzzy_hash, fuzzy_date, fuzzy_issuer +from tests.test_xmlrpc.xmlrpc_test import fuzzy_hex from tests.test_xmlrpc import objectclasses import base64 @@ -253,6 +254,7 @@ class test_host(Declarative): subject=lambda x: DN(x) == \ DN(('CN',api.env.host),('O',api.env.realm)), serial_number=fuzzy_digits, + serial_number_hex=fuzzy_hex, md5_fingerprint=fuzzy_hash, sha1_fingerprint=fuzzy_hash, issuer=fuzzy_issuer, @@ -284,6 +286,7 @@ class test_host(Declarative): subject=lambda x: DN(x) == \ DN(('CN',api.env.host),('O',api.env.realm)), serial_number=fuzzy_digits, + serial_number_hex=fuzzy_hex, md5_fingerprint=fuzzy_hash, sha1_fingerprint=fuzzy_hash, issuer=fuzzy_issuer, @@ -482,6 +485,7 @@ class test_host(Declarative): subject=lambda x: DN(x) == \ DN(('CN',api.env.host),('O',api.env.realm)), serial_number=fuzzy_digits, + serial_number_hex=fuzzy_hex, md5_fingerprint=fuzzy_hash, sha1_fingerprint=fuzzy_hash, macaddress=[u'00:50:56:30:F6:5F'], @@ -511,6 +515,7 @@ class test_host(Declarative): subject=lambda x: DN(x) == \ DN(('CN',api.env.host),('O',api.env.realm)), serial_number=fuzzy_digits, + serial_number_hex=fuzzy_hex, md5_fingerprint=fuzzy_hash, sha1_fingerprint=fuzzy_hash, macaddress=[u'00:50:56:30:F6:5F', u'00:50:56:2C:8D:82'], diff --git a/tests/test_xmlrpc/test_service_plugin.py b/tests/test_xmlrpc/test_service_plugin.py index e97fb7c87..7eccd2066 100644 --- a/tests/test_xmlrpc/test_service_plugin.py +++ b/tests/test_xmlrpc/test_service_plugin.py @@ -24,6 +24,7 @@ Test the `ipalib/plugins/service.py` module. from ipalib import api, errors, x509 from tests.test_xmlrpc.xmlrpc_test import Declarative, fuzzy_uuid, fuzzy_hash from tests.test_xmlrpc.xmlrpc_test import fuzzy_digits, fuzzy_date, fuzzy_issuer +from tests.test_xmlrpc.xmlrpc_test import fuzzy_hex from tests.test_xmlrpc import objectclasses import base64 from ipalib.dn import * @@ -380,6 +381,7 @@ class test_service(Declarative): subject=lambda x: DN(x) == \ DN(('CN',api.env.host),('O',api.env.realm)), serial_number=fuzzy_digits, + serial_number_hex=fuzzy_hex, md5_fingerprint=fuzzy_hash, sha1_fingerprint=fuzzy_hash, issuer=fuzzy_issuer, @@ -407,6 +409,7 @@ class test_service(Declarative): subject=lambda x: DN(x) == \ DN(('CN',api.env.host),('O',api.env.realm)), serial_number=fuzzy_digits, + serial_number_hex=fuzzy_hex, md5_fingerprint=fuzzy_hash, sha1_fingerprint=fuzzy_hash, issuer=fuzzy_issuer, diff --git a/tests/test_xmlrpc/xmlrpc_test.py b/tests/test_xmlrpc/xmlrpc_test.py index fd30cc63b..716ce03a0 100644 --- a/tests/test_xmlrpc/xmlrpc_test.py +++ b/tests/test_xmlrpc/xmlrpc_test.py @@ -53,6 +53,8 @@ fuzzy_date = Fuzzy('^[a-zA-Z]{3} [a-zA-Z]{3} \d{2} \d{2}:\d{2}:\d{2} \d{4} UTC$' fuzzy_issuer = Fuzzy(type=basestring, test=lambda issuer: valid_issuer(issuer, api.env.realm)) +fuzzy_hex = Fuzzy('^0x[0-9a-fA-F]+$', type=basestring) + # Matches password - password consists of all printable characters without whitespaces # The only exception is space, but space cannot be at the beggingin or end of the pwd fuzzy_password = Fuzzy('^\S([\S ]*\S)*$') |