def test_entity_attribute(self): entity_id = root(self.t).get('entityID') set_entity_attributes(root(self.t), {"http://ns.example.org": "foo"}) self.md.store.update(root(self.t), entity_id) e = self.md.lookup("{%s}%s" % ("http://ns.example.org", 'foo'))[0] assert (e is not None) assert (e.get('entityID') == entity_id)
def test_entity_attribute(self): entity_id = root(self.t).get('entityID') set_entity_attributes(root(self.t), {"http://ns.example.org": "foo"}) self.md.store.update(root(self.t), entity_id) e = self.md.lookup("{%s}%s" % ("http://ns.example.org", 'foo'))[0] assert (e is not None) assert (e.get('entityID') == entity_id)
def test_non_metadata(self): e = root(self.non_metadata) assert metadata_expiration(e) is None try: annotate_entity(e, "kaka", "x", "y") set_entity_attributes(e, dict(a=1)) assert False except MetadataException: pass
def test_non_metadata(self): e = root(self.non_metadata) assert metadata_expiration(e) is None try: annotate_entity(e,"kaka","x","y") set_entity_attributes(e, dict(a=1)) assert False except MetadataException: pass