def test_valid_credentials_object(self):
    """Test that providing valid Credentials object works correctly.

    When a user already has valid OAuth credentials, they should be able
    to pass them directly without needing to provide client ID/secret.
    """
    # Create a mock credentials object with the expected attributes
    mock_creds = Mock(spec=Credentials)
    mock_creds.client_id = "test_client_id"
    mock_creds.client_secret = "test_client_secret"
    mock_creds.scopes = ["https://www.googleapis.com/auth/calendar"]

    config = BigQueryCredentialsConfig(credentials=mock_creds)

    # Verify that the credentials are properly stored and attributes are extracted
    assert config.credentials == mock_creds
    assert config.client_id == "test_client_id"
    assert config.client_secret == "test_client_secret"
    assert config.scopes == ["https://www.googleapis.com/auth/calendar"]
Test that providing valid Credentials object works correctly.

    When a user already has valid OAuth credentials, they should be able
    to pass them directly without needing to provide client ID/secret.
    
tests/unittests/tools/bigquery/test_bigquery_credentials.py