mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-12 13:20:43 -04:00
Fix sms allowance switching to live
This commit is contained in:
@@ -124,6 +124,14 @@ def service_switch_live(service_id):
|
||||
|
||||
if form.validate_on_submit():
|
||||
current_service.update_status(live=form.enabled.data)
|
||||
if form.enabled.data is True:
|
||||
billing_api_client.create_or_update_free_sms_fragment_limit(
|
||||
service_id, 250000
|
||||
)
|
||||
else:
|
||||
billing_api_client.create_or_update_free_sms_fragment_limit(
|
||||
service_id, 40000
|
||||
)
|
||||
return redirect(url_for(".service_settings", service_id=service_id))
|
||||
|
||||
return render_template(
|
||||
|
||||
@@ -2323,6 +2323,10 @@ def client_request(logged_in_client, mocker, service_one): # noqa (C901 too com
|
||||
"app.service_api_client.get_global_notification_count", side_effect=_get
|
||||
)
|
||||
|
||||
mocker.patch(
|
||||
"app.billing_api_client.create_or_update_free_sms_fragment_limit", autospec=True
|
||||
)
|
||||
|
||||
class ClientRequest:
|
||||
@staticmethod
|
||||
@contextmanager
|
||||
|
||||
Reference in New Issue
Block a user