def setUpClass(cls): if os._exists('test.db'): os.remove('test.db') config = Config(values={'database_url': 'sqlite:///test.db'}) init_database(config) os.environ['ASYNC_TEST_TIMEOUT'] = '120' AppTest.init_project()
def setUpClass(cls): os.environ['ASYNC_TEST_TIMEOUT'] = '500' if os.path.exists('test.db'): os.remove('test.db') config = Config(values={'database_url': 'sqlite:///test.db'}) init_database(config)
def test_init(self): init_database()
def setUp(self): if os.path.exists('database.db'): os.remove('database.db') init_database()
def test_init_ignore_file_already_exists(self): init_database() # an existing database should be version controlled, raised DatabaseAlreadyControlledError # the exception is ignorable init_database()
def setUp(self): if os.path.exists('test.db'): os.remove('test.db') self.config = Config(values={'database_url': 'sqlite:///test.db'}) init_database(self.config)
def test_init(self): init_database(self.config)
def setUp(self): logging.basicConfig(level=logging.DEBUG) init_database()