def test_organisation_get_subscription_metadata_for_self_hosted_open_source(
    organisation: Organisation, mocker: MockerFixture
) -> None:
    """
    Open source should ignore the details provided in the
    subscription and always return the free plan metadata.
    """
    # Given
    Subscription.objects.filter(organisation=organisation).update(
        max_seats=100,
        max_api_calls=10000000000,
        plan="enterprise",
        subscription_id="subscription-id",
    )
    organisation.subscription.refresh_from_db()
    mocker.patch("organisations.models.is_enterprise", return_value=False)
    mocker.patch("organisations.models.is_saas", return_value=False)

    # When
    subscription_metadata = organisation.subscription.get_subscription_metadata()

    # Then
    assert subscription_metadata == FREE_PLAN_SUBSCRIPTION_METADATA

    Open source should ignore the details provided in the
    subscription and always return the free plan metadata.
    
api/tests/unit/organisations/test_unit_organisations_models.py