def test_service_get(self, mock): ''' Test if it return a list of available services (keystone services-list) ''' MockServices.flag = 0 self.assertDictEqual(keystone.service_get(), {'Error': 'Unable to resolve service id'}) MockServices.flag = 2 self.assertDictEqual(keystone.service_get(service_id='c965'), {'iptables': {'description': 'description', 'id': 'c965', 'name': 'iptables', 'type': 'type'}})
def test_service_get(self): """ Test if it return a list of available services (keystone services-list) """ MockServices.flag = 0 self.assertDictEqual(keystone.service_get(), {"Error": "Unable to resolve service id"}) MockServices.flag = 2 self.assertDictEqual( keystone.service_get(service_id="c965"), { "iptables": { "description": "description", "id": "c965", "name": "iptables", "type": "type", } }, )