Skip to content

Commit

Permalink
add tests for WorkdirCleanupJob
Browse files Browse the repository at this point in the history
  • Loading branch information
aperrin66 committed Nov 18, 2024
1 parent 899833a commit 3394f81
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions geospaas_rest_api/tests/test_processing_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,29 @@ def test_make_task_parameters(self):
(({'foo': 'bar'},), {}))


class WorkdirCleanupJobTests(unittest.TestCase):
"""Tests for WorkdirCleanupJob"""

def test_get_signature(self):
"""The signature is the cleanup_workdir task"""
self.assertEqual(
models.WorkdirCleanupJob.get_signature({}),
tasks_core.cleanup_workdir.signature()
)

def test_check_parameters(self):
"""No check needed"""
parameters = mock.Mock()
self.assertEqual(
models.WorkdirCleanupJob.check_parameters(parameters),
parameters)

def test_make_task_parameters(self):
"""No parameters needed"""
self.assertTupleEqual(
models.WorkdirCleanupJob.make_task_parameters({}),
(tuple(), {}))

class JobViewSetTests(django.test.TestCase):
"""Test jobs/ endpoints"""

Expand Down

0 comments on commit 3394f81

Please sign in to comment.