From 167406fb59a067b72d087a6ff9a557bf9e551625 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Thu, 21 Feb 2013 13:40:20 +0100 Subject: [PATCH] Use fixed test domain in realmdomains test Random domain name may bring undererministic behavior. It also breaks the test on some systems as string.lowercase is locale dependent and can return non-ASCII letters and thus later break the unicode encoding and raise UnicodeDecodeError. Use a fixed domain in "test" TLD instead. This domain is guaranteed to be not existent. --- tests/test_xmlrpc/test_realmdomains_plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_xmlrpc/test_realmdomains_plugin.py b/tests/test_xmlrpc/test_realmdomains_plugin.py index 112316382..539643b0d 100644 --- a/tests/test_xmlrpc/test_realmdomains_plugin.py +++ b/tests/test_xmlrpc/test_realmdomains_plugin.py @@ -32,7 +32,7 @@ dn = DN(('cn', cn), ('cn', 'ipa'), ('cn', 'etc'), api.env.basedn) our_domain = api.env.domain new_domain_1 = u'example1.com' new_domain_2 = u'example2.com' -bad_domain = u'this-domain-does-not-exist-%s.com' % ''.join(random.choice(string.lowercase) for x in range(10)) +bad_domain = u'doesnotexist.test' class test_realmdomains(Declarative):