From f989a97bd3a15885c955e7c414820fc8475f8e05 Mon Sep 17 00:00:00 2001 From: Blaine Jester Date: Thu, 15 Aug 2024 11:12:51 -0700 Subject: [PATCH 1/2] Remove extranous command option --- kolibri_sync_extras_plugin/__init__.py | 2 +- kolibri_sync_extras_plugin/sync/operations.py | 1 - test/sync/test_operations.py | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/kolibri_sync_extras_plugin/__init__.py b/kolibri_sync_extras_plugin/__init__.py index 3ced358..b5fdc75 100644 --- a/kolibri_sync_extras_plugin/__init__.py +++ b/kolibri_sync_extras_plugin/__init__.py @@ -1 +1 @@ -__version__ = "0.2.1" +__version__ = "0.2.2" diff --git a/kolibri_sync_extras_plugin/sync/operations.py b/kolibri_sync_extras_plugin/sync/operations.py index af497c0..2fbba71 100644 --- a/kolibri_sync_extras_plugin/sync/operations.py +++ b/kolibri_sync_extras_plugin/sync/operations.py @@ -84,7 +84,6 @@ def _get_or_queue_job(self, context, target_stage): "id": context.transfer_session.id, "target_stage": target_stage, "capabilities": list(context.capabilities), - "start_stage": context.stage, }, extra_metadata={ "type": "SYNCPROCEEDTO", diff --git a/test/sync/test_operations.py b/test/sync/test_operations.py index f469268..9198692 100644 --- a/test/sync/test_operations.py +++ b/test/sync/test_operations.py @@ -74,7 +74,6 @@ def test_get_or_queue_job__new( "id": "def456", "target_stage": "other", "capabilities": [], - "start_stage": "dequeuing", }, }, ) From 280643c5e59c807c771fef0429d7824c9d12dec8 Mon Sep 17 00:00:00 2001 From: Blaine Jester Date: Thu, 15 Aug 2024 11:19:35 -0700 Subject: [PATCH 2/2] Fix broken test --- test/sync/test_operations.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/sync/test_operations.py b/test/sync/test_operations.py index 9198692..3d61fbc 100644 --- a/test/sync/test_operations.py +++ b/test/sync/test_operations.py @@ -66,15 +66,13 @@ def test_get_or_queue_job__new( mock_job_storage.get_job.assert_not_called() job = mock_job_storage.enqueue_job.call_args[0][0] + self.assertEqual(job.args, ("sync_proceed_to",)) self.assertEqual( job.kwargs, { - "args": ("sync_proceed_to",), - "kwargs": { - "id": "def456", - "target_stage": "other", - "capabilities": [], - }, + "id": "def456", + "target_stage": "other", + "capabilities": [], }, ) self.assertEqual(