mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 23:26:23 -05:00
When a service is created add the default annual billing for the service.
This will need to be merged before https://github.com/alphagov/notifications-admin/pull/3855, it will be that until the admin PR is merged the annual billing will be set twice, but that's not an issue.
This commit is contained in:
@@ -585,7 +585,7 @@ def test_post_link_service_to_organisation_missing_payload(
|
||||
def test_link_service_to_organisation_updates_service_if_annual_billing_update_fails(
|
||||
mocker, admin_request, sample_service, sample_organisation
|
||||
):
|
||||
mocker.patch('app.dao.annual_billing_dao.set_default_free_allowance_for_service', raises=SQLAlchemyError)
|
||||
mocker.patch('app.organisation.rest.set_default_free_allowance_for_service', raises=SQLAlchemyError)
|
||||
data = {
|
||||
'service_id': str(sample_service.id)
|
||||
}
|
||||
@@ -596,6 +596,7 @@ def test_link_service_to_organisation_updates_service_if_annual_billing_update_f
|
||||
_expected_status=204
|
||||
)
|
||||
assert sample_service.organisation_id == sample_organisation.id
|
||||
assert len(AnnualBilling.query.all()) == 0
|
||||
|
||||
|
||||
def test_rest_get_organisation_services(
|
||||
|
||||
Reference in New Issue
Block a user