Skip to content

Commit

Permalink
fix units
Browse files Browse the repository at this point in the history
Signed-off-by: NilashishC <[email protected]>
  • Loading branch information
NilashishC committed Mar 28, 2024
1 parent 6dce35d commit 9a04bdd
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 175 deletions.
Empty file removed tests/unit/compat/__init__.py
Empty file.
130 changes: 0 additions & 130 deletions tests/unit/compat/mock.py

This file was deleted.

41 changes: 0 additions & 41 deletions tests/unit/compat/unittest.py

This file was deleted.

4 changes: 3 additions & 1 deletion tests/unit/mock/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@


__metaclass__ = type

from unittest.mock import MagicMock

from ansible.utils.path import unfrackpath
from ansible_collections.trendmicro.deepsec.tests.unit.compat.mock import MagicMock


mock_unfrackpath_noop = MagicMock(
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/mock/procenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@

from contextlib import contextmanager
from io import BytesIO, StringIO
from unittest import TestCase

from ansible.module_utils._text import to_bytes
from ansible.module_utils.six import PY3
from ansible_collections.trendmicro.deepsec.tests.unit.compat import unittest


@contextmanager
Expand Down Expand Up @@ -77,7 +77,7 @@ def swap_stdout():
sys.stdout = old_stdout


class ModuleTestCase(unittest.TestCase):
class ModuleTestCase(TestCase):
def setUp(self, module_args=None):
if module_args is None:
module_args = {
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/plugins/action/test_qradar_analytics_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
import tempfile
import unittest

from unittest.mock import MagicMock, patch

from ansible.playbook.task import Task
from ansible.template import Templar
from ansible_collections.ansible.utils.tests.unit.compat.mock import MagicMock, patch

from ansible_collections.ibm.qradar.plugins.action.qradar_analytics_rules import ActionModule

Expand Down

0 comments on commit 9a04bdd

Please sign in to comment.