Merge branch 'master' into email-templates

Conflicts:
	app/user/rest.py
This commit is contained in:
Martyn Inglis
2016-02-19 17:33:28 +00:00
14 changed files with 196 additions and 47 deletions

View File

@@ -210,3 +210,18 @@ def sample_notification(notify_db,
notification = Notification(**data)
save_notification(notification)
return notification
@pytest.fixture(scope='function')
def mock_celery_send_sms_code(mocker):
return mocker.patch('app.celery.tasks.send_sms_code.apply_async')
@pytest.fixture(scope='function')
def mock_celery_send_email_code(mocker):
return mocker.patch('app.celery.tasks.send_email_code.apply_async')
@pytest.fixture(scope='function')
def mock_encryption(mocker):
return mocker.patch('app.encryption.encrypt', return_value="something_encrypted")