Exemple #1
0
 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'])
Exemple #2
0
 def testInitializeDatabase(self):
     self.assertTrue(initializeDatabase(TEST_DB))
     self.assertTrue(self._fileExists(TEST_DB))