Stop calling fixtures as functions in the tests

This commit is contained in:
Katie Smith
2019-10-30 10:51:07 +00:00
parent fb875c50c1
commit 38243cf860
11 changed files with 75 additions and 158 deletions

View File

@@ -17,7 +17,6 @@ from app.notifications.receive_notifications import (
from app.models import InboundSms, EMAIL_TYPE, SMS_TYPE, INBOUND_SMS_TYPE
from tests.conftest import set_config
from tests.app.db import create_inbound_number, create_service, create_service_with_inbound_number
from tests.app.conftest import sample_service
def firetext_post(client, data, auth=True, password='testkey'):
@@ -132,9 +131,8 @@ def test_receive_notification_from_firetext_without_permissions_does_not_persist
def test_receive_notification_without_permissions_does_not_create_inbound_even_with_inbound_number_set(
client, mocker, notify_db, notify_db_session):
service = sample_service(notify_db, notify_db_session, permissions=[SMS_TYPE])
inbound_number = create_inbound_number('1', service_id=service.id, active=True)
client, mocker, sample_service):
inbound_number = create_inbound_number('1', service_id=sample_service.id, active=True)
mocked_send_inbound_sms = mocker.patch(
"app.notifications.receive_notifications.tasks.send_inbound_sms_to_service.apply_async")