From 030383db59693b51d51f8d172c01a42abaa3c38c Mon Sep 17 00:00:00 2001 From: BeritJanssen Date: Thu, 12 Oct 2023 10:38:10 +0200 Subject: [PATCH] fix tests --- backend/download/tasks.py | 1 - backend/download/tests/test_download_views.py | 2 +- backend/download/tests/test_full_data.py | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/backend/download/tasks.py b/backend/download/tasks.py index 3f2d39938..4c79a0aef 100644 --- a/backend/download/tasks.py +++ b/backend/download/tasks.py @@ -153,7 +153,6 @@ def download_full_data(request_json, user): ''' Download the full data for a visualisation ''' - visualization_type = request_json['visualization'] task_per_type = { diff --git a/backend/download/tests/test_download_views.py b/backend/download/tests/test_download_views.py index 6d9993815..1a472e3c4 100644 --- a/backend/download/tests/test_download_views.py +++ b/backend/download/tests/test_download_views.py @@ -85,7 +85,7 @@ def test_full_data_download_view(transactional_db, admin_client, small_mock_corp request_json = { 'visualization': 'date_term_frequency', 'parameters': [parameters], - 'corpus': small_mock_corpus + 'corpus_name': small_mock_corpus } response = admin_client.post( '/api/download/full_data', diff --git a/backend/download/tests/test_full_data.py b/backend/download/tests/test_full_data.py index 385fb701b..013456950 100644 --- a/backend/download/tests/test_full_data.py +++ b/backend/download/tests/test_full_data.py @@ -21,10 +21,10 @@ def test_timeline_full_data(small_mock_corpus, index_small_mock_corpus, small_mo ], 'unit': 'year' }] - - group = tasks.term_frequency_full_data_tasks(full_data_parameters, 'date_term_frequency') + visualization_type = 'date_term_frequency' + group = tasks.term_frequency_full_data_tasks(full_data_parameters, visualization_type) results = group.apply().get() - filename = tasks.make_term_frequency_csv(results, full_data_parameters) + filename = tasks.make_full_data_csv(results, visualization_type, full_data_parameters) with open(filename) as f: reader = csv.DictReader(f)