mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
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>
This commit is contained in:
parent
70dee4c1c1
commit
2e235bda9f
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user