]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pytests: move ValidNetbiosNameTests to samba.tests.netbios
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 9 Jun 2022 03:16:44 +0000 (15:16 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Tue, 6 Sep 2022 21:12:36 +0000 (21:12 +0000)
These were the only tests in __init__.py.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
python/samba/tests/__init__.py
python/samba/tests/netbios.py

index e37ceac9bc99edb684110d0ccb4f53a160aec5ba..e27dd2ff5a5cf72f8ea2cd28566e97bd478eeb67 100644 (file)
@@ -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
 
index 95f63404e743951202bb668e0251c795d8f3849e..f28b789bab700fb5b0ca14b3065c0f9e5376d2d4 100644 (file)
@@ -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"))