diff options
author | Petr Viktorin <pviktori@redhat.com> | 2014-01-06 10:38:24 +0100 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2014-03-05 10:00:58 +0100 |
commit | e6dbb2aa681f8cecfa81623ff17f4acac2b58028 (patch) | |
tree | 4faf805e46a3985cb75569c1d650004ed6814955 /ipatests/test_integration | |
parent | 87a36db6bcb701048228402887ed0c97c6fee70e (diff) | |
download | freeipa-e6dbb2aa681f8cecfa81623ff17f4acac2b58028.tar.gz freeipa-e6dbb2aa681f8cecfa81623ff17f4acac2b58028.tar.xz freeipa-e6dbb2aa681f8cecfa81623ff17f4acac2b58028.zip |
test_integration.config: Convert some text values to str
When loading from file, some strings are loaded as unicode,
which would throw off assert_deepequal.
Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'ipatests/test_integration')
-rw-r--r-- | ipatests/test_integration/config.py | 8 | ||||
-rw-r--r-- | ipatests/test_integration/host.py | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/ipatests/test_integration/config.py b/ipatests/test_integration/config.py index a8694d03d..832d5d257 100644 --- a/ipatests/test_integration/config.py +++ b/ipatests/test_integration/config.py @@ -77,8 +77,8 @@ class Config(object): self.dirman_password = kwargs.get('dirman_password') or admin_password self.dns_forwarder = kwargs.get('dns_forwarder') or '8.8.8.8' self.nis_domain = kwargs.get('nis_domain') or 'ipatest' - self.ntp_server = kwargs.get('ntp_server') or ( - '%s.pool.ntp.org' % random.randint(0, 3)) + self.ntp_server = str(kwargs.get('ntp_server') or ( + '%s.pool.ntp.org' % random.randint(0, 3))) self.ad_admin_name = kwargs.get('ad_admin_name') or 'Administrator' self.ad_admin_password = kwargs.get('ad_admin_password') or 'Secret123' self.ipv6 = bool(kwargs.get('ipv6', False)) @@ -312,10 +312,10 @@ class Domain(object): """Configuration for an IPA / AD domain""" def __init__(self, config, name, domain_type): self.log = log_mgr.get_logger(self) - self.type = domain_type + self.type = str(domain_type) self.config = config - self.name = name + self.name = str(name) self.hosts = [] self.realm = self.name.upper() diff --git a/ipatests/test_integration/host.py b/ipatests/test_integration/host.py index f78933c0c..a57e3763c 100644 --- a/ipatests/test_integration/host.py +++ b/ipatests/test_integration/host.py @@ -37,12 +37,12 @@ class BaseHost(object): def __init__(self, domain, hostname, role, ip=None, external_hostname=None): self.domain = domain - self.role = role + self.role = str(role) shortname, dot, ext_domain = hostname.partition('.') self.shortname = shortname - self.hostname = shortname + '.' + self.domain.name - self.external_hostname = external_hostname or hostname + self.hostname = str(shortname + '.' + self.domain.name) + self.external_hostname = str(external_hostname or hostname) self.netbios = self.domain.name.split('.')[0].upper() @@ -51,7 +51,7 @@ class BaseHost(object): self.log = log_mgr.get_logger(self.logger_name) if ip: - self.ip = ip + self.ip = str(ip) else: if self.config.ipv6: # $(dig +short $M $rrtype|tail -1) |