From: Douglas Bagnall Date: Thu, 9 Jun 2022 03:16:44 +0000 (+1200) Subject: pytests: move ValidNetbiosNameTests to samba.tests.netbios X-Git-Tag: talloc-2.4.0~1198 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0a5298f0c191c1a6d5451b45ee1fc37c960f4166;p=thirdparty%2Fsamba.git pytests: move ValidNetbiosNameTests to samba.tests.netbios These were the only tests in __init__.py. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett Reviewed-by: Noel Power --- diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py index e37ceac9bc9..e27dd2ff5a5 100644 --- a/python/samba/tests/__init__.py +++ b/python/samba/tests/__init__.py @@ -361,18 +361,6 @@ class RpcInterfaceTestCase(TestCase): """DCE/RPC Test case.""" -class ValidNetbiosNameTests(TestCase): - - def test_valid(self): - self.assertTrue(samba.valid_netbios_name("FOO")) - - def test_too_long(self): - self.assertFalse(samba.valid_netbios_name("FOO" * 10)) - - def test_invalid_characters(self): - self.assertFalse(samba.valid_netbios_name("*BLA")) - - class BlackboxProcessError(Exception): """This is raised when check_output() process returns a non-zero exit status diff --git a/python/samba/tests/netbios.py b/python/samba/tests/netbios.py index 95f63404e74..f28b789bab7 100644 --- a/python/samba/tests/netbios.py +++ b/python/samba/tests/netbios.py @@ -54,3 +54,15 @@ class NetBiosTests(samba.tests.TestCase): # can't get the below test to work, disabling address = '127.0.0.3' res = self.n.refresh_name((self.dc, 0x20), address, self.ifc, timeout=10) + + +class ValidNetbiosNameTests(samba.tests.TestCase): + + def test_valid(self): + self.assertTrue(samba.valid_netbios_name("FOO")) + + def test_too_long(self): + self.assertFalse(samba.valid_netbios_name("FOO" * 10)) + + def test_invalid_characters(self): + self.assertFalse(samba.valid_netbios_name("*BLA"))