def testFlushWithData(self): self.fill('test') self.fill('test2') Dictionary.flush() self.assertEqual(Dictionary.objects.all().count(),0) # Now we check the database if it is empty as it should keys = list(Dictionary._meta.cursor.keys()) self.assertEqual(len(keys),0)
def testSimpleFlush(self): Dictionary.flush() self.assertEqual(Dictionary.objects.all().count(),0) # Now we check the database if it is empty as it should keys = list(Dictionary._meta.cursor.keys()) self.assertEqual(len(keys),0)