diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-04-21 12:06:04 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-04-21 12:06:04 +0200 |
commit | f128bfd44988a4db90222e7d5af5ab94337a065d (patch) | |
tree | 8f3c4042b7ccfcc618ff4f09ee4dd9b0db11070d /source4/scripting/python | |
parent | 6f60a6e71aa9b734ec80865f598ff302d45f2bf3 (diff) | |
download | samba-f128bfd44988a4db90222e7d5af5ab94337a065d.tar.gz samba-f128bfd44988a4db90222e7d5af5ab94337a065d.tar.bz2 samba-f128bfd44988a4db90222e7d5af5ab94337a065d.zip |
Add str() for policy_handles.
Pair programmed with Jelmer
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/tests/dcerpc/misc.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/tests/dcerpc/misc.py b/source4/scripting/python/samba/tests/dcerpc/misc.py index 8726e8bde5..e9b5127a5a 100644 --- a/source4/scripting/python/samba/tests/dcerpc/misc.py +++ b/source4/scripting/python/samba/tests/dcerpc/misc.py @@ -24,6 +24,7 @@ text1 = "76f53846-a7c2-476a-ae2c-20e2b80d7b34" text2 = "344edffa-330a-4b39-b96e-2c34da52e8b1" class GUIDTests(unittest.TestCase): + def test_str(self): guid = misc.GUID(text1) self.assertEquals(text1, str(guid)) @@ -55,5 +56,9 @@ class PolicyHandleTests(unittest.TestCase): def test_repr(self): x = misc.policy_handle(text1, 42) - self.assertEquals("policy_handle('%s', %d)" % (text1, 42), repr(x)) + self.assertEquals("policy_handle(%d, '%s')" % (42, text1), repr(x)) + + def test_str(self): + x = misc.policy_handle(text1, 42) + self.assertEquals("%d, %s" % (42, text1), str(x)) |