Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BeritJanssen committed Oct 12, 2023
1 parent 93ccc83 commit 030383d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion backend/download/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion backend/download/tests/test_download_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions backend/download/tests/test_full_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 030383d

Please sign in to comment.