mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-21 07:51:13 -05:00
Update tests to not use letter contact block from services table
A few test updates were needed after rebasing onto master.
This commit is contained in:
@@ -541,7 +541,7 @@ class Template(db.Model):
|
|||||||
return LetterDVLATemplate(
|
return LetterDVLATemplate(
|
||||||
{'content': self.content, 'subject': self.subject},
|
{'content': self.content, 'subject': self.subject},
|
||||||
notification_reference=1,
|
notification_reference=1,
|
||||||
contact_block=self.service.letter_contact_block,
|
contact_block=self.service.get_default_letter_contact(),
|
||||||
)
|
)
|
||||||
|
|
||||||
def serialize(self):
|
def serialize(self):
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ from tests.app.db import (
|
|||||||
create_notification,
|
create_notification,
|
||||||
create_service,
|
create_service,
|
||||||
create_api_key,
|
create_api_key,
|
||||||
create_inbound_number
|
create_inbound_number,
|
||||||
|
create_letter_contact,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -138,7 +139,6 @@ def sample_service(
|
|||||||
email_from=None,
|
email_from=None,
|
||||||
permissions=[SMS_TYPE, EMAIL_TYPE],
|
permissions=[SMS_TYPE, EMAIL_TYPE],
|
||||||
research_mode=None,
|
research_mode=None,
|
||||||
letter_contact_block='London,\nSW1A 1AA',
|
|
||||||
):
|
):
|
||||||
if user is None:
|
if user is None:
|
||||||
user = create_user()
|
user = create_user()
|
||||||
@@ -183,7 +183,9 @@ def sample_service_full_permissions(notify_db, notify_db_session):
|
|||||||
|
|
||||||
@pytest.fixture(scope='function')
|
@pytest.fixture(scope='function')
|
||||||
def sample_service_custom_letter_contact_block(notify_db, notify_db_session):
|
def sample_service_custom_letter_contact_block(notify_db, notify_db_session):
|
||||||
return sample_service(notify_db, notify_db_session, letter_contact_block='((contact block))')
|
service = sample_service(notify_db, notify_db_session)
|
||||||
|
create_letter_contact(service, contact_block='((contact block))')
|
||||||
|
return service
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope='function')
|
@pytest.fixture(scope='function')
|
||||||
|
|||||||
Reference in New Issue
Block a user