diff options
| author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2022-06-09 15:16:44 +1200 |
|---|---|---|
| committer | Douglas Bagnall <dbagnall@samba.org> | 2022-09-06 21:12:36 +0000 |
| commit | 0a5298f0c191c1a6d5451b45ee1fc37c960f4166 (patch) | |
| tree | c1f2c6f05fec9538cf1da88d8797284b7f5369cd /python | |
| parent | 24f7d71416753b792d6fe029da6f366adb10383e (diff) | |
| download | samba-0a5298f0c191c1a6d5451b45ee1fc37c960f4166.tar.gz samba-0a5298f0c191c1a6d5451b45ee1fc37c960f4166.tar.bz2 samba-0a5298f0c191c1a6d5451b45ee1fc37c960f4166.zip | |
pytests: move ValidNetbiosNameTests to samba.tests.netbios
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>
Diffstat (limited to 'python')
| -rw-r--r-- | python/samba/tests/__init__.py | 12 | ||||
| -rw-r--r-- | python/samba/tests/netbios.py | 12 |
2 files changed, 12 insertions, 12 deletions
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")) |
