mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
Store anticipated volumes as integers
This will make it easier to do analysis on the data. Almost all users are submitting data in a numerical format now anyway, because we ask the question in a sensible way.
This commit is contained in:
@@ -620,15 +620,18 @@ def test_update_service_sets_crown(client, sample_service, org_type, expected):
|
||||
'volume_sms',
|
||||
'volume_letter',
|
||||
))
|
||||
@pytest.mark.parametrize('value', (
|
||||
'ABC123',
|
||||
None,
|
||||
@pytest.mark.parametrize('value, expected_status, expected_persisted', (
|
||||
(1234, 200, 1234),
|
||||
(None, 200, None),
|
||||
('Aa', 400, None),
|
||||
))
|
||||
def test_update_service_sets_volumes(
|
||||
admin_request,
|
||||
sample_service,
|
||||
field,
|
||||
value,
|
||||
expected_status,
|
||||
expected_persisted,
|
||||
):
|
||||
admin_request.post(
|
||||
'service.update_service',
|
||||
@@ -636,9 +639,9 @@ def test_update_service_sets_volumes(
|
||||
_data={
|
||||
field: value,
|
||||
},
|
||||
_expected_status=200,
|
||||
_expected_status=expected_status,
|
||||
)
|
||||
assert getattr(sample_service, field) == value
|
||||
assert getattr(sample_service, field) == expected_persisted
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
|
||||
Reference in New Issue
Block a user