notify-api-433b remove research mode

This commit is contained in:
Kenneth Kehl
2023-08-25 12:09:00 -07:00
parent b679550d97
commit 5a350560d7
32 changed files with 88 additions and 305 deletions

View File

@@ -8,7 +8,7 @@ from freezegun import freeze_time
import app.celery.tasks
from app import db
from app.dao.services_dao import dao_fetch_service_by_id, dao_update_service
from app.dao.services_dao import dao_fetch_service_by_id
from app.dao.users_dao import create_user_code
from app.models import (
EMAIL_TYPE,
@@ -192,20 +192,15 @@ def test_user_verify_password_missing_password(client,
assert 'Required field missing data' in json_resp['message']['password']
@pytest.mark.parametrize('research_mode', [True, False])
@freeze_time("2016-01-01 11:09:00.061258")
def test_send_user_sms_code(client,
sample_user,
sms_code_template,
mocker,
research_mode):
mocker):
"""
Tests POST endpoint /user/<user_id>/sms-code
"""
notify_service = dao_fetch_service_by_id(current_app.config['NOTIFY_SERVICE_ID'])
if research_mode:
notify_service.research_mode = True
dao_update_service(notify_service)
auth_header = create_admin_authorization_header()
mocked = mocker.patch('app.user.rest.create_secret_code', return_value='11111')