41 lines
No EOL
956 B
Python
41 lines
No EOL
956 B
Python
from datetime import datetime, timedelta
|
|
|
|
from config import DefaultConfig
|
|
from test.testlogs import TestBuildLogs
|
|
|
|
|
|
class FakeTransaction(object):
|
|
def __enter__(self):
|
|
return self
|
|
|
|
def __exit__(self, exc_type, value, traceback):
|
|
pass
|
|
|
|
|
|
class TestConfig(DefaultConfig):
|
|
TESTING = True
|
|
|
|
DB_URL = 'sqlite:///:memory:'
|
|
DB_CONNECTION_ARGS = {}
|
|
|
|
@staticmethod
|
|
def create_transaction(db):
|
|
return FakeTransaction()
|
|
|
|
DB_TRANSACTION_FACTORY = create_transaction
|
|
|
|
STORAGE_TYPE = 'FakeStorage'
|
|
|
|
BUILDLOGS_MODULE_AND_CLASS = ('test.testlogs', 'testlogs.TestBuildLogs')
|
|
BUILDLOGS_OPTIONS = ['devtable', 'building', 'deadbeef-dead-beef-dead-beefdeadbeef']
|
|
|
|
USERFILES_TYPE = 'FakeUserfiles'
|
|
|
|
FEATURE_SUPER_USERS = True
|
|
FEATURE_BILLING = True
|
|
SUPER_USERS = ['devtable']
|
|
|
|
LICENSE_USER_LIMIT = 500
|
|
LICENSE_EXPIRATION = datetime.now() + timedelta(weeks=520)
|
|
LICENSE_EXPIRATION_WARNING = datetime.now() + timedelta(weeks=520)
|
|
|