'Wrapper for mock email function.'

def get_mock_update_subtask_status(self):

    def mock_update_subtask_status(entry_id, current_task_id, new_subtask_status):
        'Increments    count    of    number    of    emails    sent.'
        self.emails_sent += new_subtask_status.succeeded
        return update_subtask_status(entry_id, current_task_id, new_subtask_status)
    return mock_update_subtask_status
