changeset 5917:68ac6055d4b2

pytest migration: remove original TestController and BaseTestCase Since all tests have been migrated to TestControllerPytest, we can remove these classes.
author Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
date Sat, 14 May 2016 21:27:12 +0200
parents 062b4418ca9d
children 66c40720e7b2
files kallithea/tests/__init__.py
diffstat 1 files changed, 2 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/tests/__init__.py	Sat May 14 21:00:02 2016 +0200
+++ b/kallithea/tests/__init__.py	Sat May 14 21:27:12 2016 +0200
@@ -61,8 +61,8 @@
 parametrize = pytest.mark.parametrize
 
 __all__ = [
-    'skipif', 'parametrize', 'parameterized', 'environ', 'url', 'TestController', 'TestControllerPytest',
-    'ldap_lib_installed', 'pam_lib_installed', 'BaseTestCase', 'init_stack',
+    'skipif', 'parametrize', 'parameterized', 'environ', 'url', 'TestControllerPytest',
+    'ldap_lib_installed', 'pam_lib_installed', 'init_stack',
     'TESTS_TMP_PATH', 'HG_REPO', 'GIT_REPO', 'NEW_HG_REPO', 'NEW_GIT_REPO',
     'HG_FORK', 'GIT_FORK', 'TEST_USER_ADMIN_LOGIN', 'TEST_USER_ADMIN_PASS',
     'TEST_USER_ADMIN_EMAIL', 'TEST_USER_REGULAR_LOGIN', 'TEST_USER_REGULAR_PASS',
@@ -170,14 +170,6 @@
 
     Session().commit()
 
-class BaseTestCase(unittest.TestCase):
-    """Unittest-style base test case. Deprecated in favor of pytest style."""
-
-    def __init__(self, *args, **kwargs):
-        self.wsgiapp = pylons.test.pylonsapp
-        init_stack(self.wsgiapp.config)
-        unittest.TestCase.__init__(self, *args, **kwargs)
-
 class BaseTestController(object):
     """Base test controller used by pytest and unittest tests controllers."""
 
@@ -233,13 +225,6 @@
     def checkSessionFlashRegex(self, response, regex, skip=0):
         self.checkSessionFlash(response, regex, skip=skip, _matcher=re.search)
 
-class TestController(BaseTestCase, BaseTestController):
-    """Deprecated unittest-style test controller"""
-
-    def __init__(self, *args, **kwargs):
-        super(TestController, self).__init__(*args, **kwargs)
-        self.init()
-
 class TestControllerPytest(BaseTestController):
     """Pytest-style test controller"""