Skip to content
Snippets Groups Projects
Commit ad0fbbc7 authored by Swen Vermeul's avatar Swen Vermeul
Browse files

added vocabulary update test

parent 3b3485b9
No related branches found
No related tags found
No related merge requests found
......@@ -19,19 +19,24 @@ def test_create_delete_vocabulay_terms(openbis_instance):
{ "code": 'term_code1', "label": "term_label1", "description": "term_description1"},
{ "code": 'term_code2', "label": "term_label2", "description": "term_description2"},
{ "code": 'term_code3', "label": "term_label3", "description": "term_description3"}
]
],
chosenFromList = False
)
assert voc.registrationDate is None
voc.save()
assert voc is not None
assert voc.registrationDate is not None
assert voc.chosenFromList is False
voc_exists = o.get_vocabulary(voc_code)
assert voc_exists is not None
assert voc_exists.code == voc_code.upper()
voc.description = 'description changed'
voc.chosenFromList = True
voc.save()
assert voc.description == 'description changed'
assert voc.chosenFromList is True
voc.delete('test on '+str(timestamp))
with pytest.raises(ValueError):
voc_exists = o.get_vocabulary(voc_code)
assert 1 == 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment