summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorLumir Balhar <lbalhar@redhat.com>2017-01-02 14:10:29 +0100
committerAndrew Bartlett <abartlet@samba.org>2017-03-10 07:31:11 +0100
commitda71c39f46581023834e129d13ab4663493c224d (patch)
tree4d9ae144c24fdfe6d6aad47fcdc544b661e513db /python
parentafe1e830de28e3ab223e71d20edff6967d888460 (diff)
downloadsamba-da71c39f46581023834e129d13ab4663493c224d.tar.gz
python: samba.tests.core: Port and enable core tests in Python 3
Port samba core tests to Python 3 compatible form and enable their execution with Python 3. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/core.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/samba/tests/core.py b/python/samba/tests/core.py
index 9dbaff11e66..7fb3698f39d 100644
--- a/python/samba/tests/core.py
+++ b/python/samba/tests/core.py
@@ -54,7 +54,7 @@ class ArcfourTestCase(TestCase):
def test_arcfour_direct(self):
key = '12345678'
plain = 'abcdefghi'
- crypt_expected = '\xda\x91Z\xb0l\xd7\xb9\xcf\x99'
+ crypt_expected = b'\xda\x91Z\xb0l\xd7\xb9\xcf\x99'
crypt_calculated = arcfour_encrypt(key, plain)
self.assertEquals(crypt_expected, crypt_calculated)
@@ -72,7 +72,7 @@ class LdbExtensionTests(TestCaseInTempDir):
l = samba.Ldb(path)
try:
l.add({"dn": "foo=dc", "bar": "bla"})
- self.assertEquals("bla",
+ self.assertEquals(b"bla",
l.searchone(basedn=ldb.Dn(l, "foo=dc"), attribute="bar"))
finally:
del l