mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
tests/credentials.py: verify the difference of parse_string("someone") and parse_string("someone%")
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
d29f7dc13b
commit
63dabd2f35
@ -70,6 +70,16 @@ class CredentialsTests(samba.tests.TestCase):
|
||||
self.assertEqual("", self.creds.get_username())
|
||||
self.assertEqual(None, self.creds.get_password())
|
||||
|
||||
def test_parse_string_empty_pw(self):
|
||||
self.creds.parse_string("someone%")
|
||||
self.assertEqual("someone", self.creds.get_username())
|
||||
self.assertEqual("", self.creds.get_password())
|
||||
|
||||
def test_parse_string_none_pw(self):
|
||||
self.creds.parse_string("someone")
|
||||
self.assertEqual("someone", self.creds.get_username())
|
||||
self.assertEqual(None, self.creds.get_password())
|
||||
|
||||
def test_parse_string_user_pw_domain(self):
|
||||
self.creds.parse_string("dom\\someone%secr")
|
||||
self.assertEqual("someone", self.creds.get_username())
|
||||
|
Loading…
Reference in New Issue
Block a user