Explorar o código

Add unit tests for the `taskflow/utils.py` module

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Mihaela Balutoiu %!s(int64=2) %!d(string=hai) anos
pai
achega
f9f2f0196c
Modificáronse 1 ficheiros con 20 adicións e 0 borrados
  1. 20 0
      coriolis/tests/taskflow/test_utils.py

+ 20 - 0
coriolis/tests/taskflow/test_utils.py

@@ -0,0 +1,20 @@
+# Copyright 2023 Cloudbase Solutions Srl
+# All Rights Reserved.
+
+
+from coriolis.taskflow import utils
+from coriolis.tests import test_base
+
+
+class DummyDeciderTestCase(test_base.CoriolisBaseTestCase):
+    """Test suite for the Coriolis DummyDecider class."""
+
+    def setUp(self):
+        super(DummyDeciderTestCase, self).setUp()
+        self.decider = utils.DummyDecider()
+
+    def test__init__(self):
+        self.assertEqual(True, self.decider._allow)
+
+    def test__call__(self):
+        self.assertEqual(True, self.decider('history'))