def test_endpoint_create(self): """ Test if it create an endpoint for an Openstack service """ self.assertDictEqual( keystone.endpoint_create("nova"), {"Error": "Could not find the specified service"}, ) MockServices.flag = 2 self.assertDictEqual( keystone.endpoint_create( "iptables", "http://public/url", "http://internal/url", "http://adminurl/url", "RegionOne", ), { "adminurl": "adminurl", "id": "007", "internalurl": "internalurl", "publicurl": "publicurl", "region": "RegionOne", "service_id": "117", }, )
def test_endpoint_create(self, mock): ''' Test if it create an endpoint for an Openstack service ''' self.assertDictEqual(keystone.endpoint_create('nova'), {'Error': 'Could not find the specified service'}) MockServices.flag = 2 self.assertDictEqual(keystone.endpoint_create('iptables', 'http://public/url', 'http://internal/url', 'http://adminurl/url'), {'adminurl': 'adminurl', 'id': '007', 'internalurl': 'internalurl', 'publicurl': 'publicurl', 'region': 'region', 'service_id': '117'})
def test_endpoint_create(self, mock): ''' Test if it create an endpoint for an Openstack service ''' self.assertDictEqual(keystone.endpoint_create('nova'), {'Error': 'Could not find the specified service'}) MockServices.flag = 2 self.assertDictEqual(keystone.endpoint_create('iptables', 'http://public/url', 'http://internal/url', 'http://adminurl/url'), {'adminurl': 'adminurl', 'id': '007', 'internalurl': 'internalurl', 'publicurl': 'publicurl', 'region': 'region', 'service_id': '117'})