Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dchhabda committed Oct 18, 2024
1 parent a24a1b6 commit 194ac71
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions test/test_api/test_task_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -986,22 +986,6 @@ def test_task_delete(self):
assert task not in tasks, tasks
assert root_task not in tasks, tasks


@with_context
@patch('pybossa.repositories.task_repository.uploader')
def test_task_delete_deletes_zip_files(self, uploader):
"""Test API task delete deletes also zip files with tasks and taskruns"""
admin = UserFactory.create()
project = ProjectFactory.create(owner=admin)
task = TaskFactory.create(project=project)
url = '/api/task/%s?api_key=%s' % (task.id, admin.api_key)
res = self.app.delete(url)
expected = [call('1_project1_task_json.zip', 'user_1'),
call('1_project1_task_csv.zip', 'user_1'),
call('1_project1_task_run_json.zip', 'user_1'),
call('1_project1_task_run_csv.zip', 'user_1')]
assert uploader.delete_file.call_args_list == expected

@with_context
def test_delete_task_cascade(self):
"""Test API delete task deletes associated taskruns"""
Expand Down

0 comments on commit 194ac71

Please sign in to comment.