summaryrefslogtreecommitdiffstats
path: root/src/config/SSSDConfigTest.py
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2015-08-04 15:03:44 +0200
committerJakub Hrozek <jhrozek@redhat.com>2015-08-04 16:19:52 +0200
commit2ab9822a792e26e9ddb47cbb6bc788a0727c8556 (patch)
treee33e799a7f8cd9c8672875e84403f005900c5eed /src/config/SSSDConfigTest.py
parent6fe057efb981ee4b45dcadf131c03f8501fce28d (diff)
downloadsssd-2ab9822a792e26e9ddb47cbb6bc788a0727c8556.tar.gz
sssd-2ab9822a792e26e9ddb47cbb6bc788a0727c8556.tar.xz
sssd-2ab9822a792e26e9ddb47cbb6bc788a0727c8556.zip
SSSDConfig: Return correct types in python3
In Python 3, dict.keys() returns a view rather than a list. Since dict keys aren't in any particular order, indexing them doesn't make sense. Resolves: https://fedorahosted.org/sssd/ticket/2699 Reviewed-by: Christian Heimes <cheimes@redhat.com>
Diffstat (limited to 'src/config/SSSDConfigTest.py')
-rwxr-xr-xsrc/config/SSSDConfigTest.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config/SSSDConfigTest.py b/src/config/SSSDConfigTest.py
index 1d6107cea..67289e012 100755
--- a/src/config/SSSDConfigTest.py
+++ b/src/config/SSSDConfigTest.py
@@ -1299,6 +1299,7 @@ class SSSDConfigTestSSSDConfig(unittest.TestCase):
'nss',
'pam']
active_services = sssdconfig.list_active_services()
+ self.assertTrue(isinstance(active_services, list))
for service in control_list:
self.assertTrue(service in active_services,
@@ -1521,6 +1522,7 @@ class SSSDConfigTestSSSDConfig(unittest.TestCase):
'IPA',
'LOCAL']
active_domains = sssdconfig.list_active_domains()
+ self.assertTrue(isinstance(active_domains, list))
for domain in control_list:
self.assertTrue(domain in active_domains,