redash/tests/__init__.py
Arik Fraimovich 4af979d3eb Split __init__ into several modules and remove flask-peewee dependency.
This should make imports more sensible and with less side effects. Also might reduce the memory footprint of the workers.
2014-05-18 10:19:07 +03:00

21 lines
445 B
Python

import logging
from unittest import TestCase
from redash import settings
settings.DATABASE_CONFIG = {
'name': 'circle_test',
'threadlocals': True
}
from redash import models
logging.getLogger('peewee').setLevel(logging.INFO)
class BaseTestCase(TestCase):
def setUp(self):
models.create_db(True, True)
models.init_db()
def tearDown(self):
models.db.close_db(None)
models.create_db(False, True)