Commit f6586be4 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

astakos: Clean up tables on test completion

to get over sqlite driver issues to properly clean up database on transaction
test cases.
parent a56c5f68
......@@ -32,7 +32,7 @@
# or implied, of GRNET S.A.
from astakos.im.tests.common import *
from django.test import TestCase
ROOT = '/astakos/api/'
u = lambda url: ROOT + url
......
......@@ -39,13 +39,14 @@ class ShibbolethTests(TestCase):
Testing shibboleth authentication.
"""
fixtures = ['groups']
def setUp(self):
self.client = ShibbolethClient()
astakos_settings.IM_MODULES = ['local', 'shibboleth']
astakos_settings.MODERATION_ENABLED = True
def tearDown(self):
AstakosUser.objects.all().delete()
@im_settings(FORCE_PROFILE_UPDATE=False)
def test_create_account(self):
......@@ -337,8 +338,6 @@ class ShibbolethTests(TestCase):
class TestLocal(TestCase):
fixtures = ['groups']
def setUp(self):
settings.ADMINS = (('admin', 'support@cloud.synnefo.org'),)
settings.SERVER_EMAIL = 'no-reply@synnefo.org'
......@@ -347,6 +346,7 @@ class TestLocal(TestCase):
def tearDown(self):
settings.ASTAKOS_MODERATION_ENABLED = self._orig_moderation
AstakosUser.objects.all().delete()
def test_no_moderation(self):
# disable moderation
......@@ -682,6 +682,9 @@ class UserActionsTests(TestCase):
class TestAuthProviderViews(TestCase):
def tearDown(self):
AstakosUser.objects.all().delete()
@shibboleth_settings(CREATION_GROUPS_POLICY=['academic-login'],
AUTOMODERATE_POLICY=True)
@im_settings(IM_MODULES=['shibboleth', 'local'], MODERATION_ENABLED=True,
......
......@@ -68,6 +68,10 @@ class TestProjects(TestCase):
quotas.qh_sync_users(AstakosUser.objects.all())
def tearDown(self):
Service.objects.all().delete()
ProjectApplication.objects.all().delete()
@im_settings(PROJECT_ADMINS=['uuid1'])
def test_application_limit(self):
# user cannot create a project
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment