mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-02 17:48:36 -04:00
Move provider restriction into broadcast settings
This means we will have a much easier way of knowing what the settings are for a broadcast service. Note, we can just move data directly into the newer table as there is nothing on the API or admin app that is putting data in the `service_broadcast_provider_restriction` table, this was being done manually for the few services that needed it.
This commit is contained in:
@@ -19,7 +19,7 @@ from app.models import (
|
||||
Notification,
|
||||
Permission,
|
||||
Service,
|
||||
ServiceBroadcastProviderRestriction,
|
||||
ServiceBroadcastSettings,
|
||||
ServiceEmailReplyTo,
|
||||
ServiceLetterContact,
|
||||
ServicePermission,
|
||||
@@ -280,11 +280,8 @@ def test_get_service_by_id(admin_request, sample_service):
|
||||
|
||||
|
||||
def test_get_service_by_id_returns_allowed_broadcast_provider(notify_db, admin_request, sample_service):
|
||||
notify_db.session.add(ServiceBroadcastProviderRestriction(
|
||||
service=sample_service,
|
||||
provider='ee'
|
||||
))
|
||||
notify_db.session.commit()
|
||||
settings = ServiceBroadcastSettings(service=sample_service, channel="severe", provider="ee")
|
||||
notify_db.session.add(settings)
|
||||
|
||||
json_resp = admin_request.get('service.get_service_by_id', service_id=sample_service.id)
|
||||
assert json_resp['data']['id'] == str(sample_service.id)
|
||||
|
||||
Reference in New Issue
Block a user