def METHOD_NAME(self, export, get_cached):
    get_cached.return_value = None
    res = self.client.post_json(
        api.url_for(resource.DownloadView, path='candidates', office='S')
    )
    assert res.json == {'status': 'queued'}
    get_cached.assert_called_once_with(
        '/v1/candidates/', b'office=S', filename=None
    )
    export.delay.assert_called_once_with(
        '/v1/candidates/', base64.b64encode(b'office=S').decode('UTF-8')
    )