diff options
Diffstat (limited to 'okupy/tests/integration')
-rw-r--r-- | okupy/tests/integration/test_index.py | 7 | ||||
-rw-r--r-- | okupy/tests/integration/test_lists.py | 7 | ||||
-rw-r--r-- | okupy/tests/integration/test_login.py | 7 | ||||
-rw-r--r-- | okupy/tests/integration/test_settings.py | 7 | ||||
-rw-r--r-- | okupy/tests/integration/test_signup.py | 7 |
5 files changed, 30 insertions, 5 deletions
diff --git a/okupy/tests/integration/test_index.py b/okupy/tests/integration/test_index.py index e2c754e..cec706d 100644 --- a/okupy/tests/integration/test_index.py +++ b/okupy/tests/integration/test_index.py @@ -13,13 +13,18 @@ class IndexIntegrationTests(TestCase): def setUpClass(cls): cls.mockldap = MockLdap(vars.DIRECTORY) + @classmethod + def tearDownClass(cls): + del cls.mockldap + def setUp(self): self.client = Client() self.mockldap.start() - self.ldapobject = self.mockldap[settings.AUTH_LDAP_SERVER_URI] + self.ldapobj = self.mockldap[settings.AUTH_LDAP_SERVER_URI] def tearDown(self): self.mockldap.stop() + del self.ldapobj def test_redirect_to_login_for_anonymous(self): response = self.client.get('/') diff --git a/okupy/tests/integration/test_lists.py b/okupy/tests/integration/test_lists.py index a9ad99e..e6360a9 100644 --- a/okupy/tests/integration/test_lists.py +++ b/okupy/tests/integration/test_lists.py @@ -14,13 +14,18 @@ class ListsIntegrationTests(TestCase): def setUpClass(cls): cls.mockldap = MockLdap(vars.DIRECTORY) + @classmethod + def tearDownClass(cls): + del cls.mockldap + def setUp(self): self.client = Client() self.mockldap.start() - self.ldapobject = self.mockldap[settings.AUTH_LDAP_SERVER_URI] + self.ldapobj = self.mockldap[settings.AUTH_LDAP_SERVER_URI] def tearDown(self): self.mockldap.stop() + del self.ldapobj def test_devlist_page_uses_correct_template(self): response = self.client.get('/devlist/') diff --git a/okupy/tests/integration/test_login.py b/okupy/tests/integration/test_login.py index f30c742..378c2e9 100644 --- a/okupy/tests/integration/test_login.py +++ b/okupy/tests/integration/test_login.py @@ -17,10 +17,15 @@ class LoginIntegrationTests(TestCase): def setUp(self): self.client = Client() self.mockldap.start() - self.ldapobject = self.mockldap[settings.AUTH_LDAP_SERVER_URI] + self.ldapobj = self.mockldap[settings.AUTH_LDAP_SERVER_URI] def tearDown(self): self.mockldap.stop() + del self.ldapobj + + @classmethod + def tearDownClass(cls): + del cls.mockldap def test_login_page_uses_correct_template(self): response = self.client.get('/login/') diff --git a/okupy/tests/integration/test_settings.py b/okupy/tests/integration/test_settings.py index 3779e51..94ef620 100644 --- a/okupy/tests/integration/test_settings.py +++ b/okupy/tests/integration/test_settings.py @@ -13,13 +13,18 @@ class SettingsIntegrationTests(TestCase): def setUpClass(cls): cls.mockldap = MockLdap(vars.DIRECTORY) + @classmethod + def tearDownClass(cls): + del cls.mockldap + def setUp(self): self.client = Client() self.mockldap.start() - self.ldapobject = self.mockldap[settings.AUTH_LDAP_SERVER_URI] + self.ldapobj = self.mockldap[settings.AUTH_LDAP_SERVER_URI] def tearDown(self): self.mockldap.stop() + del self.ldapobj def test_profile_settings_page_uses_correct_template(self): response = self.client.post('/login/', vars.LOGIN_ALICE) diff --git a/okupy/tests/integration/test_signup.py b/okupy/tests/integration/test_signup.py index 86041b5..64e8d50 100644 --- a/okupy/tests/integration/test_signup.py +++ b/okupy/tests/integration/test_signup.py @@ -13,13 +13,18 @@ class SignupIntegrationTests(TestCase): def setUpClass(cls): cls.mockldap = MockLdap(vars.DIRECTORY) + @classmethod + def tearDownClass(cls): + del cls.mockldap + def setUp(self): self.client = Client() self.mockldap.start() - self.ldapobject = self.mockldap[settings.AUTH_LDAP_SERVER_URI] + self.ldapobj = self.mockldap[settings.AUTH_LDAP_SERVER_URI] def tearDown(self): self.mockldap.stop() + del self.ldapobj def test_signup_page_uses_correct_template(self): response = self.client.get('/signup/') |