diff options
Diffstat (limited to 'src/mailman/utilities/tests')
| -rw-r--r-- | src/mailman/utilities/tests/test_email.py | 8 | ||||
| -rw-r--r-- | src/mailman/utilities/tests/test_import.py | 8 | ||||
| -rw-r--r-- | src/mailman/utilities/tests/test_passwords.py | 29 | ||||
| -rw-r--r-- | src/mailman/utilities/tests/test_templates.py | 10 | ||||
| -rw-r--r-- | src/mailman/utilities/tests/test_wrap.py | 8 |
5 files changed, 7 insertions, 56 deletions
diff --git a/src/mailman/utilities/tests/test_email.py b/src/mailman/utilities/tests/test_email.py index d34c55ee8..8b847f475 100644 --- a/src/mailman/utilities/tests/test_email.py +++ b/src/mailman/utilities/tests/test_email.py @@ -21,7 +21,6 @@ from __future__ import absolute_import, unicode_literals __metaclass__ = type __all__ = [ - 'test_suite', ] @@ -40,10 +39,3 @@ class TestEmail(unittest.TestCase): def test_no_at_split(self): self.assertEqual(split_email('anne'), ('anne', None)) - - - -def test_suite(): - suite = unittest.TestSuite() - suite.addTest(unittest.makeSuite(TestEmail)) - return suite diff --git a/src/mailman/utilities/tests/test_import.py b/src/mailman/utilities/tests/test_import.py index b31de46cf..d66faeff0 100644 --- a/src/mailman/utilities/tests/test_import.py +++ b/src/mailman/utilities/tests/test_import.py @@ -21,7 +21,6 @@ from __future__ import absolute_import, unicode_literals __metaclass__ = type __all__ = [ - 'test_suite', ] @@ -68,10 +67,3 @@ class TestBasicImport(unittest.TestCase): self._import() self.assertTrue(self._mlist.include_list_post_header) self.assertTrue(self._mlist.include_rfc2369_headers) - - - -def test_suite(): - suite = unittest.TestSuite() - suite.addTest(unittest.makeSuite(TestBasicImport)) - return suite diff --git a/src/mailman/utilities/tests/test_passwords.py b/src/mailman/utilities/tests/test_passwords.py index c9b3d2e91..058cf97de 100644 --- a/src/mailman/utilities/tests/test_passwords.py +++ b/src/mailman/utilities/tests/test_passwords.py @@ -21,7 +21,6 @@ from __future__ import absolute_import, unicode_literals __metaclass__ = type __all__ = [ - 'test_suite', ] @@ -36,7 +35,7 @@ from mailman.utilities import passwords -class TestPasswordsBase(unittest.TestCase): +class PasswordsTestBase: scheme = None def setUp(self): @@ -72,7 +71,7 @@ class TestPasswordsBase(unittest.TestCase): -class TestBogusPasswords(TestPasswordsBase): +class TestBogusPasswords(PasswordsTestBase, unittest.TestCase): scheme = -1 def test_passwords(self): @@ -89,7 +88,7 @@ class TestBogusPasswords(TestPasswordsBase): -class TestNonePasswords(TestPasswordsBase): +class TestNonePasswords(PasswordsTestBase, unittest.TestCase): scheme = passwords.Schemes.no_scheme def test_passwords(self): @@ -112,19 +111,19 @@ class TestNonePasswords(TestPasswordsBase): -class TestCleartextPasswords(TestPasswordsBase): +class TestCleartextPasswords(PasswordsTestBase, unittest.TestCase): scheme = passwords.Schemes.cleartext -class TestSHAPasswords(TestPasswordsBase): +class TestSHAPasswords(PasswordsTestBase, unittest.TestCase): scheme = passwords.Schemes.sha -class TestSSHAPasswords(TestPasswordsBase): +class TestSSHAPasswords(PasswordsTestBase, unittest.TestCase): scheme = passwords.Schemes.ssha -class TestPBKDF2Passwords(TestPasswordsBase): +class TestPBKDF2Passwords(PasswordsTestBase, unittest.TestCase): scheme = passwords.Schemes.pbkdf2 @@ -203,17 +202,3 @@ class TestPasswordGeneration(unittest.TestCase): def test_encrypt_password_scheme_value_error(self): self.assertRaises(ValueError, passwords.encrypt_password, 'abc', 'foo') - - - -def test_suite(): - suite = unittest.TestSuite() - suite.addTest(unittest.makeSuite(TestBogusPasswords)) - suite.addTest(unittest.makeSuite(TestNonePasswords)) - suite.addTest(unittest.makeSuite(TestCleartextPasswords)) - suite.addTest(unittest.makeSuite(TestSHAPasswords)) - suite.addTest(unittest.makeSuite(TestSSHAPasswords)) - suite.addTest(unittest.makeSuite(TestPBKDF2Passwords)) - suite.addTest(unittest.makeSuite(TestSchemeLookup)) - suite.addTest(unittest.makeSuite(TestPasswordGeneration)) - return suite diff --git a/src/mailman/utilities/tests/test_templates.py b/src/mailman/utilities/tests/test_templates.py index e21b44544..504972da3 100644 --- a/src/mailman/utilities/tests/test_templates.py +++ b/src/mailman/utilities/tests/test_templates.py @@ -21,7 +21,6 @@ from __future__ import absolute_import, unicode_literals __metaclass__ = type __all__ = [ - 'test_suite', ] @@ -276,12 +275,3 @@ This is a very nice template. It has a few substitutions. It will not be wrapped. """) - - - -def test_suite(): - suite = unittest.TestSuite() - suite.addTest(unittest.makeSuite(TestSearchOrder)) - suite.addTest(unittest.makeSuite(TestFind)) - suite.addTest(unittest.makeSuite(TestMake)) - return suite diff --git a/src/mailman/utilities/tests/test_wrap.py b/src/mailman/utilities/tests/test_wrap.py index 2fc6c6ccf..5ef658e14 100644 --- a/src/mailman/utilities/tests/test_wrap.py +++ b/src/mailman/utilities/tests/test_wrap.py @@ -21,7 +21,6 @@ from __future__ import absolute_import, unicode_literals __metaclass__ = type __all__ = [ - 'test_suite', ] @@ -142,10 +141,3 @@ This is a single paragraph that consists of one sentence. And another one that breaks because it is indented. Followed by one more paragraph.""") - - - -def test_suite(): - suite = unittest.TestSuite() - suite.addTest(unittest.makeSuite(TestWrap)) - return suite |
