def test_serialize_list_with_items(self): item_list = IdList() item1 = Item('id1') item2 = Item('id2') item_list.add(item1) item_list.add(item2) assert item_list.serialize() == [item1.serialize(), item2.serialize()]
def test_serialize_empty_list(self): item_list = IdList() assert item_list.serialize() == []