'Test current update keys have priority over deprecated keys.'

@mock.patch('cinder.api.openstack.wsgi.Controller.validate_name_and_description')
def test_volume_update_deprecation_key_priority(self, mock_validate):

    self.mock_object(volume_api.API, 'get', v2_fakes.fake_volume_api_get)
    self.mock_object(volume_api.API, 'update', v2_fakes.fake_volume_update)
    self.mock_object(db.sqlalchemy.api, '_volume_type_get_full', v2_fakes.fake_volume_type_get)
    updates = {'name': 'New    Name', 'description': 'New    Description', 'display_name': 'Not    Shown    Name', 'display_description': 'Not    Shown    Description'}
    body = {'volume': updates}
    req = fakes.HTTPRequest.blank(('/v2/volumes/%s' % fake.VOLUME_ID))
    self.assertEqual(0, len(self.notifier.notifications))
    res_dict = self.controller.update(req, fake.VOLUME_ID, body)
    expected = self._expected_vol_from_controller(availability_zone=v2_fakes.DEFAULT_AZ, name='New    Name', description='New    Description', metadata={'attached_mode': 'rw', 'readonly': 'False'})
    self.assertEqual(expected, res_dict)
    self.assertEqual(2, len(self.notifier.notifications))
    self.assertTrue(mock_validate.called)
