mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
provision: Add tests for determine_netbios_name.
This commit is contained in:
@ -24,6 +24,7 @@ from samba.provision import (
|
||||
ProvisionNames,
|
||||
ProvisionPaths,
|
||||
ProvisionResult,
|
||||
determine_netbios_name,
|
||||
sanitize_server_role,
|
||||
setup_secretsdb,
|
||||
findnss,
|
||||
@ -190,3 +191,11 @@ class ProvisionResultTests(TestCase):
|
||||
self.assertEquals(entries[1],
|
||||
("INFO", 'Admin password: geheim'))
|
||||
|
||||
|
||||
class DetermineNetbiosNameTests(TestCase):
|
||||
|
||||
def test_limits_to_15(self):
|
||||
self.assertEquals("A" * 15, determine_netbios_name("a" * 30))
|
||||
|
||||
def test_strips_invalid(self):
|
||||
self.assertEquals("BLABLA", determine_netbios_name("bla/bla"))
|
||||
|
Reference in New Issue
Block a user