Add test coverage for setting service permission

Spotted that we aren't testing all our permission types here so added
this one in.

It includes the TODO for allowing the API to give a service the
broadcast permission. We don't want this to happen, we want them to use
the `set_as_broadcast_service` route instead. We will probably get away
with it for the moment for it would be tighter validation we should add
to reduce the risk of letting a service get in a dodgy state.
This commit is contained in:
David McDonald
2021-03-03 18:22:41 +00:00
parent 0ce539704e
commit fcf667f09c

View File

@@ -973,6 +973,8 @@ def test_update_service_permissions_will_add_service_permissions(client, sample_
(INTERNATIONAL_SMS_TYPE),
(LETTER_TYPE),
(INBOUND_SMS_TYPE),
(EMAIL_AUTH_TYPE),
(BROADCAST_TYPE), # TODO: remove this ability to set broadcast permission this way
]
)
def test_add_service_permission_will_add_permission(client, service_with_no_permissions, permission_to_add):