summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2017-05-03 19:11:03 +0200
committerAndrew Bartlett <abartlet@samba.org>2017-05-19 22:20:16 +0200
commite99c0e6503d5cfa048c62b0a6d954d3e7504ff62 (patch)
treed30c0735c7de7138211237759b9bdefa6bd463f5 /python
parent40e409bf9e89a163c771b2a58493d2c1b496fae7 (diff)
downloadsamba-e99c0e6503d5cfa048c62b0a6d954d3e7504ff62.tar.gz
python3:tests: Fix Python 3 test issues
- Forgotten text strings that should be binary - Inverted PY3 condition Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/core.py4
-rw-r--r--python/samba/tests/dcerpc/misc.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/python/samba/tests/core.py b/python/samba/tests/core.py
index 7fb3698f39d..504d458b7f8 100644
--- a/python/samba/tests/core.py
+++ b/python/samba/tests/core.py
@@ -52,8 +52,8 @@ class SubstituteVarTestCase(TestCase):
class ArcfourTestCase(TestCase):
def test_arcfour_direct(self):
- key = '12345678'
- plain = 'abcdefghi'
+ key = b'12345678'
+ plain = b'abcdefghi'
crypt_expected = b'\xda\x91Z\xb0l\xd7\xb9\xcf\x99'
crypt_calculated = arcfour_encrypt(key, plain)
self.assertEquals(crypt_expected, crypt_calculated)
diff --git a/python/samba/tests/dcerpc/misc.py b/python/samba/tests/dcerpc/misc.py
index 68654a7bfd5..2ec095063e9 100644
--- a/python/samba/tests/dcerpc/misc.py
+++ b/python/samba/tests/dcerpc/misc.py
@@ -25,7 +25,7 @@ text1 = "76f53846-a7c2-476a-ae2c-20e2b80d7b34"
text2 = "344edffa-330a-4b39-b96e-2c34da52e8b1"
-if not PY3:
+if PY3:
# cmp() exists only in Python 2
def cmp(a, b):
return (a > b) - (a < b)