from samba.dcerpc import misc
import samba.tests
+from samba.compat import PY3
text1 = "76f53846-a7c2-476a-ae2c-20e2b80d7b34"
text2 = "344edffa-330a-4b39-b96e-2c34da52e8b1"
def test_compare_different(self):
guid1 = misc.GUID(text1)
guid2 = misc.GUID(text2)
- self.assertTrue(cmp(guid1, guid2) > 0)
+ self.assertFalse(guid1 == guid2)
+ if not PY3:
+ # cmp() exists only in Python 2
+ self.assertTrue(cmp(guid1, guid2) > 0)
def test_compare_same(self):
guid1 = misc.GUID(text1)
guid2 = misc.GUID(text1)
- self.assertEquals(0, cmp(guid1, guid2))
+ self.assertTrue(guid1 == guid2)
self.assertEquals(guid1, guid2)
+ if not PY3:
+ # cmp() exists only in Python 2
+ self.assertEquals(0, cmp(guid1, guid2))
class PolicyHandleTests(samba.tests.TestCase):
planpythontestsuite("none", "samba.tests.auth")
planpythontestsuite("none", "samba.tests.get_opt")
planpythontestsuite("none", "samba.tests.security")
-planpythontestsuite("none", "samba.tests.dcerpc.misc")
+planpythontestsuite("none", "samba.tests.dcerpc.misc", py3_compatible=True)
planpythontestsuite("none", "samba.tests.dcerpc.integer")
planpythontestsuite("none", "samba.tests.param", py3_compatible=True)
planpythontestsuite("none", "samba.tests.upgrade")