def test_delete(self): self.insert_rows() Band.delete().where(Band.name == "CSharps").run_sync() response = Band.count().where(Band.name == "CSharps").run_sync() self.assertEqual(response, 0)
def test_count(self): self.insert_rows() response = Band.count().where(Band.name == "Pythonistas").run_sync() self.assertEqual(response, 1)