def METHOD_NAME(self):
    db = WarningsDatabase()
    self.assertEqual(len(db), 0)
    for i in range(10):
        db.insert(get_warning(), compute_hash=False)
    self.assertEqual(len(db), 10)
    warnings = list(db)
    self.assertEqual(len(warnings), 10)