1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

tests/ntlm_auth: Port ntlm_auth tests to python: ntlm_auth against winbindd

Port ntlm_auth bash script tests to python

Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Samuel Cabrero
2018-08-31 14:26:59 +02:00
committed by Noel Power
parent 247592f716
commit 4a11ab373b
2 changed files with 15 additions and 1 deletions

View File

@ -23,6 +23,12 @@ from samba.compat import get_string
class NTLMAuthHelpersTests(NTLMAuthTestCase):
def setUp(self):
super(NTLMAuthHelpersTests, self).setUp()
self.username = os.environ["DC_USERNAME"]
self.password = os.environ["DC_PASSWORD"]
self.domain = os.environ["DOMAIN"]
def test_specified_domain(self):
""" ntlm_auth with specified domain """
@ -51,3 +57,12 @@ class NTLMAuthHelpersTests(NTLMAuthTestCase):
server_domain=domain,
server_use_winbind=False)
self.assertTrue(ret)
def test_agaist_winbind(self):
""" ntlm_auth against winbindd """
ret = self.run_helper(client_username=self.username,
client_password=self.password,
client_domain=self.domain,
server_use_winbind=True)
self.assertTrue(ret)