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.
This commit is contained in:
Martin Kosek 2013-02-21 13:40:20 +01:00
parent a41e10f0eb
commit 167406fb59

View File

@ -32,7 +32,7 @@ dn = DN(('cn', cn), ('cn', 'ipa'), ('cn', 'etc'), api.env.basedn)
our_domain = api.env.domain our_domain = api.env.domain
new_domain_1 = u'example1.com' new_domain_1 = u'example1.com'
new_domain_2 = u'example2.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): class test_realmdomains(Declarative):