mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Fix the fixtures for templates lacking certain permissions
These fixtures were both calling other fixtures as functions and being called as functions in the tests. Rewriting the tests to make them Pytest 4 compatible means we are no longer using `sample_template_without_letter_permission`, so this has been deleted.
This commit is contained in:
@@ -262,13 +262,9 @@ def sample_template(
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def sample_template_without_sms_permission(notify_db, notify_db_session):
|
||||
return sample_template(notify_db, notify_db_session, permissions=[EMAIL_TYPE])
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def sample_template_without_letter_permission(notify_db, notify_db_session):
|
||||
return sample_template(notify_db, notify_db_session, template_type="letter", permissions=[EMAIL_TYPE])
|
||||
def sample_template_without_sms_permission(notify_db_session):
|
||||
service = create_service(service_permissions=[EMAIL_TYPE], check_if_service_exists=True)
|
||||
return create_template(service, template_type=SMS_TYPE)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
@@ -312,8 +308,9 @@ def sample_email_template(
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def sample_template_without_email_permission(notify_db, notify_db_session):
|
||||
return sample_email_template(notify_db, notify_db_session, permissions=[SMS_TYPE])
|
||||
def sample_template_without_email_permission(notify_db_session):
|
||||
service = create_service(service_permissions=[SMS_TYPE], check_if_service_exists=True)
|
||||
return create_template(service, template_type=EMAIL_TYPE)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
Reference in New Issue
Block a user