Rewiring how we do statsd

- decorater added to the DAO for notifications
This commit is contained in:
Martyn Inglis
2016-08-02 14:23:47 +01:00
parent daf85e7787
commit 61aaa36f9b
5 changed files with 85 additions and 6 deletions

View File

@@ -367,6 +367,16 @@ def sample_notification(notify_db,
return notification
@pytest.fixture(scope='function')
def mock_statsd_inc(mocker):
return mocker.patch('app.statsd_client.incr')
@pytest.fixture(scope='function')
def mock_statsd_timing(mocker):
return mocker.patch('app.statsd_client.timing')
@pytest.fixture(scope='function')
def mock_celery_send_sms_code(mocker):
return mocker.patch('app.celery.tasks.send_sms_code.apply_async')