From affe76fbcfbd4cfbae821b8d388aec3ce61f50c6 Mon Sep 17 00:00:00 2001 From: Sebastian Tobie Date: Fri, 24 Nov 2023 21:45:50 +0100 Subject: [PATCH] removed tests --- .../plugins/module_utils/generic/__init__.py | 0 .../module_utils/generic/test_generic.py | 39 ------------------- 2 files changed, 39 deletions(-) delete mode 100644 tests/unit/plugins/module_utils/generic/__init__.py delete mode 100644 tests/unit/plugins/module_utils/generic/test_generic.py diff --git a/tests/unit/plugins/module_utils/generic/__init__.py b/tests/unit/plugins/module_utils/generic/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/unit/plugins/module_utils/generic/test_generic.py b/tests/unit/plugins/module_utils/generic/test_generic.py deleted file mode 100644 index 269d33b..0000000 --- a/tests/unit/plugins/module_utils/generic/test_generic.py +++ /dev/null @@ -1,39 +0,0 @@ -import os -import unittest - -try: # pragma: nocover - from ansible_collections.sebastian.systemd.plugins.module_utils.generic import Types -except ImportError: # pragma: nocover - import sys - - sys.path.append("plugins/module_utils") - from generic import Types - - -class TestTypes(unittest.TestCase): - """tests the Types class""" - - def testsimpletype(self): - """this tests if an simple type is correctly build""" - output = Types.str(required=True, help="test", choices=("a", "1"), default="1") - self.assertIn("type", output) - self.assertIn("required", output) - self.assertIn("default", output) - self.assertIn("choices", output) - self.assertEquals(output["type"], "str") - self.assertEquals(Types.str.__name__, "str") - self.assertEquals(output["required"], True) - self.assertEquals(output["default"], "1") - self.assertTupleEqual(output["choices"], ("a", "1")) - Types.str() - - def testlisttype(self): - """this tests if the special type list is correctly build""" - output = Types.list(str) - Types.list("str") - self.assertIn("type", output) - self.assertIn("elements", output) - self.assertIn("required", output) - self.assertEquals(output["type"], "list") - self.assertEquals(output["required"], False) - self.assertEquals(output["elements"], "str")