Commit out using the new end points until data is migrated

This commit is contained in:
venusbb
2017-11-14 16:23:08 +00:00
parent 581759931f
commit a9f06c23f7
3 changed files with 11 additions and 9 deletions

View File

@@ -20,8 +20,7 @@ from app.notify_client.models import InvitedUser
from app import ( from app import (
invite_api_client, invite_api_client,
user_api_client, user_api_client,
service_api_client, service_api_client
billing_api_client
) )
from app.utils import ( from app.utils import (
@@ -54,7 +53,8 @@ def _create_service(service_name, organisation_type, email_from, form):
) )
session['service_id'] = service_id session['service_id'] = service_id
billing_api_client.create_or_update_free_sms_fragment_limit(service_id, free_sms_fragment_limit) # TODO: Comment out until data migration
# billing_api_client.create_or_update_free_sms_fragment_limit(service_id, free_sms_fragment_limit)
return service_id, None return service_id, None
except HTTPError as e: except HTTPError as e:

View File

@@ -718,11 +718,12 @@ def set_free_sms_allowance(service_id):
if form.validate_on_submit(): if form.validate_on_submit():
service_api_client.update_service( service_api_client.update_service(
service_id, service_id,
# TODO: Retire this after new end points are added. # TODO: Retire this eventually after using annual_billing
free_sms_fragment_limit=form.free_sms_allowance.data, free_sms_fragment_limit=form.free_sms_allowance.data,
) )
billing_api_client.create_or_update_free_sms_fragment_limit(service_id, form.free_sms_allowance.data) # TODO: Comment out until data migration
# billing_api_client.create_or_update_free_sms_fragment_limit(service_id, form.free_sms_allowance.data)
return redirect(url_for('.service_settings', service_id=service_id)) return redirect(url_for('.service_settings', service_id=service_id))

View File

@@ -1615,10 +1615,11 @@ def test_should_set_sms_allowance(
SERVICE_ONE_ID, SERVICE_ONE_ID,
free_sms_fragment_limit=expected_api_argument, free_sms_fragment_limit=expected_api_argument,
) )
mock_create_or_update_free_sms_fragment_limit.assert_called_with( # Not assert until using the annual_billing end points
SERVICE_ONE_ID, # mock_create_or_update_free_sms_fragment_limit.assert_called_with(
expected_api_argument # SERVICE_ONE_ID,
) # expected_api_argument
# )
def test_switch_service_enable_letters( def test_switch_service_enable_letters(