- Timestamp:
- Nov 14, 2012, 12:59:34 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified vendor/current/source4/scripting/python/samba/tests/dcerpc/bare.py ¶
r414 r740 1 #!/usr/bin/ python1 #!/usr/bin/env python 2 2 # -*- coding: utf-8 -*- 3 3 … … 19 19 # 20 20 21 """Tests for samba.dcerpc.bare.""" 22 21 23 from samba.dcerpc import ClientConnection 22 from unittest import TestCase 23 from samba.tests import cmdline_loadparm 24 import samba.tests 24 25 25 26 class BareTestCase(TestCase): 26 class BareTestCase(samba.tests.TestCase): 27 27 28 28 def test_bare(self): 29 29 # Connect to the echo pipe 30 30 x = ClientConnection("ncalrpc:localhost[DEFAULT]", 31 ("60a15ec5-4de8-11d7-a637-005056a20182", 1), lp_ctx=cmdline_loadparm) 31 ("60a15ec5-4de8-11d7-a637-005056a20182", 1), 32 lp_ctx=samba.tests.env_loadparm()) 32 33 self.assertEquals("\x01\x00\x00\x00", x.request(0, chr(0) * 4)) 33 34 34 35 def test_alter_context(self): 35 36 x = ClientConnection("ncalrpc:localhost[DEFAULT]", 36 ("12345778-1234-abcd-ef00-0123456789ac", 1), lp_ctx=cmdline_loadparm) 37 ("12345778-1234-abcd-ef00-0123456789ac", 1), 38 lp_ctx=samba.tests.env_loadparm()) 37 39 y = ClientConnection("ncalrpc:localhost", 38 40 ("60a15ec5-4de8-11d7-a637-005056a20182", 1), 39 basis_connection=x, lp_ctx= cmdline_loadparm)41 basis_connection=x, lp_ctx=samba.tests.env_loadparm()) 40 42 x.alter_context(("60a15ec5-4de8-11d7-a637-005056a20182", 1)) 41 43 # FIXME: self.assertEquals("\x01\x00\x00\x00", x.request(0, chr(0) * 4)) … … 43 45 def test_two_connections(self): 44 46 x = ClientConnection("ncalrpc:localhost[DEFAULT]", 45 ("60a15ec5-4de8-11d7-a637-005056a20182", 1), lp_ctx=cmdline_loadparm) 47 ("60a15ec5-4de8-11d7-a637-005056a20182", 1), 48 lp_ctx=samba.tests.env_loadparm()) 46 49 y = ClientConnection("ncalrpc:localhost", 47 50 ("60a15ec5-4de8-11d7-a637-005056a20182", 1), 48 basis_connection=x, lp_ctx= cmdline_loadparm)51 basis_connection=x, lp_ctx=samba.tests.env_loadparm()) 49 52 self.assertEquals("\x01\x00\x00\x00", y.request(0, chr(0) * 4))
Note:
See TracChangeset
for help on using the changeset viewer.