def test_a_authorize_xml(self): resp, content = utils.get_token_xml('joeuser', 'secrete', self.tenant) self.assertEqual(200, int(resp['status'])) self.assertEqual('application/xml', utils.content_type(resp)) #verify content dom = etree.Element("root") dom.append(etree.fromstring(content)) auth = dom.find("{http://docs.openstack.org/identity/api/v2.0}" \ "auth") if auth == None: self.fail("Expecting Auth") service_catalog = auth.find( "{http://docs.openstack.org/identity/api/v2.0}" \ "serviceCatalog") if service_catalog == None: self.fail("Expecting Service Catalog")
def test_a_authorize_xml(self): resp, content = utils.get_token_xml('joeuser', 'secrete', self.tenant) self.assertEqual(200, int(resp['status'])) self.assertEqual('application/xml', utils.content_type(resp))