'Tests the happy path for creating a volume attachment.'

@mock.patch('nova.volume.cinder.cinderclient')
def test_attachment_create(self, mock_cinderclient):

    attachment_ref = {'id': uuids.attachment_id, 'connection_info': {}}
    expected_attachment_ref = {'id': uuids.attachment_id, 'connection_info': {'data': {}}}
    mock_cinderclient.return_value.attachments.create.return_value = attachment_ref
    result = self.api.attachment_create(self.ctx, uuids.volume_id, uuids.instance_id)
    self.assertEqual(expected_attachment_ref, result)
    mock_cinderclient.return_value.attachments.create.assert_called_once_with(uuids.volume_id, None, uuids.instance_id)
