change datatype property to datainfo

- according to SECoP v1.0
- internally the name 'datatype' is kept

Change-Id: I0298a45f2db529ced3a07e2e9b344c91cfb7bb88
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21300
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
2019-09-24 16:02:18 +02:00
parent 596353e09a
commit 8631fd47a1
3 changed files with 6 additions and 6 deletions

View File

@ -36,17 +36,17 @@ def test_Command():
assert cmd.ctr
assert cmd.argument is None
assert cmd.result is None
assert cmd.for_export() == {u'datatype': {'type': 'command'},
assert cmd.for_export() == {u'datainfo': {'type': 'command'},
u'description': u'do_something'}
cmd = Command(u'do_something', argument=IntRange(-9,9), result=IntRange(-1,1))
assert cmd.description
assert isinstance(cmd.argument, IntRange)
assert isinstance(cmd.result, IntRange)
assert cmd.for_export() == {u'datatype': {'type': 'command', 'argument': {'type': 'int', 'min':-9, 'max':9},
assert cmd.for_export() == {u'datainfo': {'type': 'command', 'argument': {'type': 'int', 'min':-9, 'max':9},
u'result': {'type': 'int', 'min':-1, 'max':1}},
u'description': u'do_something'}
assert cmd.exportProperties() == {u'datatype': {'type': 'command', 'argument': {'type': 'int', 'max': 9, 'min': -9},
assert cmd.exportProperties() == {u'datainfo': {'type': 'command', 'argument': {'type': 'int', 'max': 9, 'min': -9},
'result': {'type': 'int', 'max': 1, 'min': -1}},
u'description': u'do_something'}