def test_mock_content(self): mock = self._content(id='mock1', items=ALL_ITEMS) for k in ALL_ITEMS.keys(): assert k in mock assert mock.get(k) is ALL_ITEMS.get(k) assert mock.get(k).__parent__ is mock assert mock.__parent__ == self.site
def test_resolve(self): mock = self._content(id='mock_resolve', items=ALL_ITEMS) container_uid = IUUID(mock) # noqa item1_uid = ALL_ITEMS.keys()[0] resolver = self.get_resolver(mock) o = resolver(item1_uid) assert o is ALL_ITEMS[item1_uid] ## equivalency for __parent__ pointer; resolver does not ## get the same acqusition wrapper, so we test identity ## unwrapped, plus equivalent paths: assert self._content_equivalent(o.__parent__, mock)