from unittest import TestCase

from ocyan.plugin.wagtail_oscar_integration.uwsgi_compat import cron


class CronCompatibilityTests(TestCase):
    def test_fallback_keeps_cron_callback_callable(self):
        @cron(0, -1, -1, -1, -1, target="spooler")
        def task(arguments):
            return arguments

        self.assertEqual(task({"site_id": 1}), {"site_id": 1})
