summaryrefslogtreecommitdiffstats
path: root/tests/test_xmlrpc/test_dns_plugin.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-12-09 14:57:34 -0500
committerSimo Sorce <ssorce@redhat.com>2010-12-17 17:01:57 -0500
commitffc967b47ab0c38c361ce7a60283ed0b8c618d81 (patch)
treeb9e498c3c6d4a3e1eb291f6137b11bbc5b3989dc /tests/test_xmlrpc/test_dns_plugin.py
parent623abc6bdff15a77fc14eac9dc1af975e9d98b2f (diff)
downloadfreeipa-ffc967b47ab0c38c361ce7a60283ed0b8c618d81.tar.gz
freeipa-ffc967b47ab0c38c361ce7a60283ed0b8c618d81.tar.xz
freeipa-ffc967b47ab0c38c361ce7a60283ed0b8c618d81.zip
Fix a slew of tests.
- Skip the DNS tests if DNS isn't configured - Add new attributes to user entries (displayname, cn and initials) - Make the nsaccountlock value consistent - Fix the cert subject for cert tests
Diffstat (limited to 'tests/test_xmlrpc/test_dns_plugin.py')
-rw-r--r--tests/test_xmlrpc/test_dns_plugin.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_dns_plugin.py b/tests/test_xmlrpc/test_dns_plugin.py
index 1ceee9850..dcaa0658c 100644
--- a/tests/test_xmlrpc/test_dns_plugin.py
+++ b/tests/test_xmlrpc/test_dns_plugin.py
@@ -20,6 +20,7 @@
Test the `ipalib/plugins/dns.py` module.
"""
+import nose
from ipalib import api, errors
from tests.test_xmlrpc import objectclasses
from xmlrpc_test import Declarative, fuzzy_digits, fuzzy_uuid
@@ -29,6 +30,19 @@ dnsres1 = u'testdnsres'
class test_dns(Declarative):
+ def setUp(self):
+ super(test_dns, self).setUp()
+ try:
+ api.Command['dnszone_add'](dnszone1,
+ idnssoamname = u'ns1.%s' % dnszone1,
+ idnssoarname = u'root.%s' % dnszone1,
+ )
+ api.Command['dnszone_del'](dnszone1)
+ except errors.NotFound:
+ raise nose.SkipTest('DNS is not configured')
+ except errors.DuplicateEntry:
+ pass
+
cleanup_commands = [
('dnszone_del', [dnszone1], {}),
('dnsrecord_del', [dnszone1, dnsres1], {}),