def test_realm(self): element = Auth(username='******', password='******', realm='realm') 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'] == 'Authorization.realm': assert tag['#text'] == 'realm'
def test_url(self): element = Auth(username='******', password='******', url='http://121.0.0.1:8097/request') 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'] == 'Authorization.url': assert tag['#text'] == 'http://121.0.0.1:8097/request'
def test_mechanism(self): element = Auth(username='******', password='******', mechanism=AuthMechanism.KERBEROS) 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'] == 'Authorization.mechanism': assert tag['#text'] == 'KERBEROS'