def test_items_should_contains_all_entries(test_entry_json, test_child_entry_json): entry = Entry(None, **test_entry_json) child = Entry(None, **test_child_entry_json) entry.link(child) items = entry.items() assert entry.id in items assert child.id in items
def test_items_should_contains_all_entries(test_root_entry_json, test_entry_json, test_child_entry_json): root_entry = RootEntry(**test_root_entry_json) entry = Entry(None, **test_entry_json) child = Entry(None, **test_child_entry_json) entry.link(child) root_entry.wrap(entry) items = entry.items() root_items = root_entry.items() assert all(map(lambda item: item in root_items, items))
def test_items_should_not_contains_additional_item(test_entry_json, test_child_entry_json): entry = Entry(None, **test_entry_json) child = Entry(None, **test_child_entry_json) entry.link(child) items = entry.items() assert len(items) == 2