def test_organisation_get_subscription_metadata_for_manually_added_enterprise_saas_licenses(
    organisation: Organisation,
    subscription_id: str | None,
    plan: str,
    max_seats: int,
    max_api_calls: int,
    expected_seats: int,
    expected_api_calls: int,
    expected_projects: int | None,
    mocker: MockerFixture,
) -> None:
    """
    Specific test to make sure that we can manually add subscriptions to
    the SaaS platform and the values stored in the Django database will
    be correctly used.
    """
    # Given
    Subscription.objects.filter(organisation=organisation).update(
        subscription_id=subscription_id,
        plan=plan,
        max_seats=max_seats,
        max_api_calls=max_api_calls,
    )
    organisation.subscription.refresh_from_db()
    mocker.patch("organisations.models.is_saas", return_value=True)

    # When
    subscription_metadata = organisation.subscription.get_subscription_metadata()

    # Then
    assert subscription_metadata.projects == expected_projects
    assert subscription_metadata.seats == expected_seats
    assert subscription_metadata.api_calls == expected_api_calls

    Specific test to make sure that we can manually add subscriptions to
    the SaaS platform and the values stored in the Django database will
    be correctly used.
    
api/tests/unit/organisations/test_unit_organisations_models.py