コード例 #1
0
ファイル: tests.py プロジェクト: goldenboy/squeak
    def _drop_column(self, table, column):
        cursor = sqlite3.connect(self.db).cursor()
        start = len(cursor.execute("SELECT * from %s" % table).fetchone())
        cursor.close()

        squeak = Squeak(self.db, table)
        squeak.drop_column(column)

        cursor = sqlite3.connect(self.db).cursor()
        end = len(cursor.execute("SELECT * from %s" % table).fetchone())
        cursor.close()

        return self.assert_(start == end + 1)