def test_link_to_material(self): user = authUser() exp = user.newProtocol('Test') data = exp.addDataField('Test') material = exp.addMaterial('Test') data.linkToMaterial(material) linkedMaterials = data.getLinkedMaterials() assert linkedMaterials[0].id == material.id
def test_getData(self, entity): user = authUser() exp = user.newExperiment('Test') data = exp.addDataField('Test', value='test') material = exp.addMaterial(resource_id=entity.id) data.linkToMaterial(material) result = entity.getData() assert result[0].id == data.id
def user(self): return authUser()
def loggedUser(self): return authUser()