def mock_context_one_device_match_vid(mock_context, mock_device_with_vid_factory, mock_interface_settings_match,
                                      valid_vendor_id):
    """
    Fixture that yields a mock USB context that yields one device that matches based
    on vendor id, class, subclass, and protocol.
    """
    device = mock_device_with_vid_factory(valid_vendor_id)
    device.iterSettings.return_value = [mock_interface_settings_match]
    mock_context.getDeviceList.return_value = [device]
    return mock_context