diff options
author | Noel Power <noel.power@suse.com> | 2018-11-05 19:00:20 +0000 |
---|---|---|
committer | Tim Beale <timbeale@samba.org> | 2018-11-27 03:43:17 +0100 |
commit | 2e235bda9f7e0aa8bce4846264eecd2e051a6c57 (patch) | |
tree | 113fabc2ae4e32af28cd442978f901b729bc6fb9 /python | |
parent | 70dee4c1c14ea3eb5c8c81887c6caaa6dc288807 (diff) | |
download | samba-2e235bda9f7e0aa8bce4846264eecd2e051a6c57.tar.gz |
python/samba/test: PY3 port samba.tests.domain_backup
The restoredc already runs under python3, so before we can run the
domain_backup tests against the restoredc, we need to make sure they
work under python3.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676
Signed-off-by: Noel Power <noel.power@suse.com>
Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/tests/domain_backup.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/samba/tests/domain_backup.py b/python/samba/tests/domain_backup.py index b9e97eb3369..7147f0fdfe4 100644 --- a/python/samba/tests/domain_backup.py +++ b/python/samba/tests/domain_backup.py @@ -271,7 +271,7 @@ class DomainBackupBase(SambaToolCmdTest, TestCaseInTempDir): self.assertEqual(len(bkp_pd), 1) acn = bkp_pd[0].get('samAccountName') self.assertIsNotNone(acn) - self.assertEqual(acn[0].replace('$', ''), self.new_server) + self.assertEqual(str(acn[0]), self.new_server + '$') self.assertIsNotNone(bkp_pd[0].get('secret')) samdb = SamDB(url=paths.samdb, session_info=system_session(), @@ -552,8 +552,9 @@ class DomainBackupRename(DomainBackupBase): self.assertEqual(len(res), 1, "Failed to find renamed link source object") self.assertTrue(link_attr in res[0], "Missing link attribute") - self.assertTrue(new_target_dn in res[0][link_attr]) - self.assertTrue(new_server_dn in res[0][link_attr]) + link_values = [str(x) for x in res[0][link_attr]] + self.assertTrue(new_target_dn in link_values) + self.assertTrue(new_server_dn in link_values) # extra checks we run on the restored DB in the rename case def check_restored_database(self, lp, expect_secrets=True): |