Exemplo n.º 1
0
    def test_schemaGeneration(self, tablesToCheckFor):
        """Ensure that we created all of the tables we need"""

        testclient.initDB("tests/testResponses.db")
        conn = sqlite3.connect('tests/testResponses.db')
        c = conn.cursor()
        listOfTables = []
        for table in c.execute('SELECT name FROM sqlite_master WHERE type="table"'):
            listOfTables.append(table[0].encode('ascii', 'ignore'))
        for table in tablesToCheckFor:
            assert table in listOfTables
Exemplo n.º 2
0
 def setup_class(self):
     self.b = testclient.Bot()
     os.system("rm tests/testResponses.db")
     testclient.initDB('tests/testResponses.db')
Exemplo n.º 3
0
 def setup_class(self):
     self.b = testclient.Bot()
     os.system("rm tests/botChatDump 2>/dev/null")
     os.system("rm tests/testResponses.db 2>/dev/null")
     testclient.initDB('tests/testResponses.db')