def setUp(self): self.databaseFd, APP.config['DATABASE'] = mkstemp(suffix='test.db') APP.config['TESTING'] = True self.app = APP.test_client() with APP.app_context(): ayeaye.initializeDatabase(APP.config['DATABASE']) self.database = sqlite3.connect(APP.config['DATABASE'])
def testInitializeDatabase(self): self.assertTrue(initializeDatabase(TEST_DB)) self.assertTrue(self._fileExists(TEST_DB))