mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
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>
This commit is contained in:
parent
40e409bf9e
commit
e99c0e6503
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user