mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
4af979d3eb
This should make imports more sensible and with less side effects. Also might reduce the memory footprint of the workers.
21 lines
445 B
Python
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) |