mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
Add organisation_id to Service.
This is the second commit in the series to add organisation_id to Service. - Data migration to update services.organisation_id from data in organisation_to_service (The rollback will lose any updates to organisation unless the script is updated to set organistion_to_service from service.organisation_id ) - Update Service.organisation relationship to a ForeignKey relationship to Organisation. - Update Organisation.services to a backref relationship to Service.
This commit is contained in:
@@ -58,6 +58,7 @@ from app.models import (
|
||||
INTERNATIONAL_SMS_TYPE,
|
||||
LETTER_TYPE,
|
||||
user_folder_permissions,
|
||||
Organisation
|
||||
)
|
||||
from tests.app.db import (
|
||||
create_ft_billing,
|
||||
@@ -124,6 +125,7 @@ def test_create_service_with_organisation(notify_db_session):
|
||||
dao_create_service(service, user)
|
||||
assert Service.query.count() == 1
|
||||
service_db = Service.query.one()
|
||||
organisation = Organisation.query.get(organisation.id)
|
||||
assert service_db.name == "service_name"
|
||||
assert service_db.id == service.id
|
||||
assert service_db.email_from == 'email_from'
|
||||
|
||||
Reference in New Issue
Block a user