Skip to content
Snippets Groups Projects
Commit 9d2a7289 authored by Julian's avatar Julian
Browse files

Switched tests from tmpfile to in-memory databases

parent 3abcbf20
No related branches found
No related tags found
No related merge requests found
......@@ -49,13 +49,12 @@ class UffdTestCase(unittest.TestCase):
'password': self.test_data.get(user).get('password')}, follow_redirects=True)
def setUp(self):
self.dir = tempfile.mkdtemp()
# It would be far better to create a minimal app here, but since the
# session module depends on almost everything else, that is not really feasable
config = {
'TESTING': True,
'DEBUG': True,
'SQLALCHEMY_DATABASE_URI': 'sqlite:///%s/db.sqlite'%self.dir,
'SQLALCHEMY_DATABASE_URI': 'sqlite:///:memory:',
'SECRET_KEY': 'DEBUGKEY',
'LDAP_SERVICE_MOCK': True,
'MAIL_SKIP_SEND': True,
......@@ -117,4 +116,3 @@ class UffdTestCase(unittest.TestCase):
def tearDown(self):
self.client.__exit__(None, None, None)
shutil.rmtree(self.dir)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment