def test_detach(self): audit.detach_log(self.conn) self.conn.execute("INSERT INTO tab VALUES('no', 'audit')") with self.assertRaises(sqlite3.OperationalError): #no _audit table self.conn.execute("SELECT * FROM _audit").fetchall()
def tearDown(self): audit.detach_log(self.conn) self.conn.close()