def METHOD_NAME(mock_func: mock.MagicMock, client: FlaskClient):
    response = client.get('/dataset?name=test_dataset.csv')
    mock_func.assert_called_once_with('test', 'test_dataset.csv')
    assert response.status_code == 200
    assert response.mimetype == 'text/csv'
    assert (response.headers.get('Content-Disposition') ==
           'attachment; filename=test_dataset.csv')
    # Make sure that the response hasn't changed
    assert response.data == test_data_csv