Update sample_service_full_perms to leave out letters_as_pdf permissions

- as letters_as_pdf is a temporary service permission until the build dvla file process is deprecated rather than update all the tests to remove the permission so that they pass, lets remove it here instead
This commit is contained in:
Ken Tsang
2017-12-11 16:17:07 +00:00
parent 3e71e9a294
commit d0fcfa7d0c

View File

@@ -161,7 +161,7 @@ def sample_service(
'message_limit': limit,
'restricted': restricted,
'email_from': email_from,
'created_by': user
'created_by': user,
}
service = Service.query.filter_by(name=service_name).first()
if not service:
@@ -188,7 +188,7 @@ def sample_service_full_permissions(notify_db, notify_db_session):
notify_db_session,
# ensure name doesn't clash with regular sample service
service_name="sample service full permissions",
permissions=SERVICE_PERMISSION_TYPES
permissions=set(SERVICE_PERMISSION_TYPES) - {'letters_as_pdf'}
)
@@ -299,10 +299,6 @@ def sample_template_without_email_permission(notify_db, notify_db_session):
@pytest.fixture
def sample_letter_template(sample_service_full_permissions):
# remove letters_as_pdf from fixture until we drop building of dvla files
from app.dao.service_permissions_dao import dao_remove_service_permission
dao_remove_service_permission(sample_service_full_permissions.id, 'letters_as_pdf')
return create_template(sample_service_full_permissions, template_type=LETTER_TYPE)