def test_description(self): element = Argument(name='var', value='1', desc='description') rendered_doc = tag_wrapper(element.to_xml(), 'result') parsed_doc = xmltodict.parse(rendered_doc) for tag in parsed_doc['result']['elementProp']['stringProp']: if tag['@name'] == 'Argument.desc': assert tag['#text'] == 'description'
def test_metadata(self): element = Argument(name='var', value='1', metadata='+') rendered_doc = tag_wrapper(element.to_xml(), 'result') parsed_doc = xmltodict.parse(rendered_doc) for tag in parsed_doc['result']['elementProp']['stringProp']: if tag['@name'] == 'Argument.metadata': assert tag['#text'] == '+'
def test_name(self): element = Argument(name='var', value='1') rendered_doc = tag_wrapper(element.to_xml(), 'result') parsed_doc = xmltodict.parse(rendered_doc) assert parsed_doc['result']['elementProp']['@name'] == 'var'