mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Add the yearly free limit to the service model.
This allows us to reference it across the API code base and return it in the API. But not currently attached to the service DB model - a static method on the class.
This commit is contained in:
@@ -147,6 +147,17 @@ def test_get_service_by_id(client, sample_service):
|
||||
assert json_resp['data']['sms_sender'] == current_app.config['FROM_NUMBER']
|
||||
|
||||
|
||||
def test_get_service_by_id_returns_free_sms_limit(client, sample_service):
|
||||
auth_header = create_authorization_header()
|
||||
resp = client.get(
|
||||
'/service/{}'.format(sample_service.id),
|
||||
headers=[auth_header]
|
||||
)
|
||||
assert resp.status_code == 200
|
||||
json_resp = json.loads(resp.get_data(as_text=True))
|
||||
assert json_resp['data']['free_sms_fragment_limit'] == 250000
|
||||
|
||||
|
||||
def test_get_service_list_has_default_permissions(client, service_factory):
|
||||
service_factory.get('one')
|
||||
service_factory.get('two')
|
||||
|
||||
Reference in New Issue
Block a user