libsmb: Use clistr_smb2_extract_snapshot_token() in cli_smb2_create_fnum_send()
[Samba.git] / python / samba / tests / libsmb.py
blob85068b1caec6cbbe7c823f83f3e328340e0fb034
1 # Unix SMB/CIFS implementation.
2 # Copyright Volker Lendecke <vl@samba.org> 2012
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 """Tests for samba.samba3.libsmb."""
20 from samba.samba3 import libsmb_samba_internal as libsmb
21 from samba.dcerpc import security
22 from samba.samba3 import param as s3param
23 from samba import credentials
24 import samba.tests
25 import os
27 class LibsmbTests(samba.tests.TestCase):
29 def setUp(self):
30 self.lp = s3param.get_context()
31 self.lp.load(samba.tests.env_get_var_value("SMB_CONF_PATH"))
33 self.creds = credentials.Credentials()
34 self.creds.guess(self.lp)
35 self.creds.set_domain(samba.tests.env_get_var_value("DOMAIN"))
36 self.creds.set_username(samba.tests.env_get_var_value("USERNAME"))
37 self.creds.set_password(samba.tests.env_get_var_value("PASSWORD"))
39 # Build the global inject file path
40 server_conf = samba.tests.env_get_var_value("SERVERCONFFILE")
41 server_conf_dir = os.path.dirname(server_conf)
42 self.global_inject = os.path.join(server_conf_dir, "global_inject.conf")
44 self.server_ip = samba.tests.env_get_var_value("SERVER_IP")