+ def check_storage(self, content: list[Day]) -> None:
+ """Test cache and DB equal content."""
+ expected_cache = {}
+ for item in content:
+ expected_cache[item.id_] = item
+ self.assertEqual(Day.get_cache(), expected_cache)
+ db_found: list[Day] = []
+ for item in content:
+ assert isinstance(item.id_, str)
+ for row in self.db_conn.row_where(Day.table_name, 'id', item.id_):
+ db_found += [Day.from_table_row(self.db_conn, row)]
+ self.assertEqual(sorted(content), sorted(db_found))
+