def test_amplitude_configuration_save_writes_environment_to_dynamodb(  # type: ignore[no-untyped-def]
    environment, mocker
):
    """
    Test to verify that AmplitudeConfiguration's base model class works as expected
    """
    # Given
    amplitude_config = AmplitudeConfiguration(
        environment=environment, api_key="api-key", base_url="https://base.url.com"
    )
    mock_environment_model_class = mocker.patch(
        "integrations.common.models.Environment"
    )

    # When
    amplitude_config.save()

    # Then
    mock_environment_model_class.write_environment_documents.assert_called_once_with(
        environment_id=environment.id
    )

    Test to verify that AmplitudeConfiguration's base model class works as expected
    
api/tests/unit/integrations/amplitude/test_unit_amplitude_models.py