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
Beispiel #2
0
 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
Beispiel #3
0
 def user(self):
     return authUser()
Beispiel #4
0
 def loggedUser(self):
     return authUser()