summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-25 04:54:38 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-25 04:54:38 +0200
commit74126bc6d0211a7674156dfda8ab13054b403a1d (patch)
tree0bb9a6b894d037a1bdd5f224023f486b75610738 /source4/scripting/python
parent5211755563bb2738c328d24a813d86c77eca048f (diff)
downloadsamba-74126bc6d0211a7674156dfda8ab13054b403a1d.tar.gz
samba-74126bc6d0211a7674156dfda8ab13054b403a1d.tar.bz2
samba-74126bc6d0211a7674156dfda8ab13054b403a1d.zip
Expose transfer and abstract syntax.
(This used to be commit a875e07a37568b7e51c290074d5e3834c2caa4d6)
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/tests/dcerpc/bare.py13
-rw-r--r--source4/scripting/python/samba/tests/dcerpc/rpcecho.py4
2 files changed, 12 insertions, 5 deletions
diff --git a/source4/scripting/python/samba/tests/dcerpc/bare.py b/source4/scripting/python/samba/tests/dcerpc/bare.py
index eea6744e42..d75ffc381e 100644
--- a/source4/scripting/python/samba/tests/dcerpc/bare.py
+++ b/source4/scripting/python/samba/tests/dcerpc/bare.py
@@ -28,11 +28,14 @@ class BareTestCase(TestCase):
("60a15ec5-4de8-11d7-a637-005056a20182", 1))
self.assertEquals("\x01\x00\x00\x00", x.request(0, chr(0) * 4))
- #def test_alter_context(self):
- # x = ClientConnection("ncalrpc:localhost[DEFAULT]",
- # ("12345778-1234-abcd-ef00-0123456789ac", 1))
- # x.alter_context(("60a15ec5-4de8-11d7-a637-005056a20182", 1))
- # self.assertEquals("\x01\x00\x00\x00", x.request(0, chr(0) * 4))
+ def test_alter_context(self):
+ x = ClientConnection("ncalrpc:localhost[DEFAULT]",
+ ("12345778-1234-abcd-ef00-0123456789ac", 1))
+ y = ClientConnection("ncalrpc:localhost",
+ ("60a15ec5-4de8-11d7-a637-005056a20182", 1),
+ basis_connection=x)
+ x.alter_context(("60a15ec5-4de8-11d7-a637-005056a20182", 1))
+ # FIXME: self.assertEquals("\x01\x00\x00\x00", x.request(0, chr(0) * 4))
def test_two_connections(self):
x = ClientConnection("ncalrpc:localhost[DEFAULT]",
diff --git a/source4/scripting/python/samba/tests/dcerpc/rpcecho.py b/source4/scripting/python/samba/tests/dcerpc/rpcecho.py
index 7fd1bcc5b8..68b7a42d52 100644
--- a/source4/scripting/python/samba/tests/dcerpc/rpcecho.py
+++ b/source4/scripting/python/samba/tests/dcerpc/rpcecho.py
@@ -30,6 +30,10 @@ class RpcEchoTests(RpcInterfaceTestCase):
self.conn2 = echo.rpcecho("ncalrpc", basis_connection=self.conn)
self.assertEquals(3, self.conn2.AddOne(2))
+ def test_abstract_syntax(self):
+ self.assertEquals(("60a15ec5-4de8-11d7-a637-005056a20182", 1),
+ self.conn.abstract_syntax)
+
def test_addone(self):
self.assertEquals(2, self.conn.AddOne(1))