summaryrefslogtreecommitdiff
path: root/test/units/modules/network/ovs/test_openvswitch_port.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/units/modules/network/ovs/test_openvswitch_port.py')
-rw-r--r--test/units/modules/network/ovs/test_openvswitch_port.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/units/modules/network/ovs/test_openvswitch_port.py b/test/units/modules/network/ovs/test_openvswitch_port.py
index d56e480bbc..d9fc55e691 100644
--- a/test/units/modules/network/ovs/test_openvswitch_port.py
+++ b/test/units/modules/network/ovs/test_openvswitch_port.py
@@ -20,11 +20,10 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
-import json
-
from ansible.compat.tests.mock import patch
from ansible.modules.network.ovs import openvswitch_port
-from .ovs_module import TestOpenVSwitchModule, load_fixture, set_module_args
+from units.modules.utils import set_module_args
+from .ovs_module import TestOpenVSwitchModule, load_fixture
test_name_side_effect_matrix = {
'test_openvswitch_port_absent_idempotent': [
@@ -75,6 +74,8 @@ class TestOpenVSwitchPortModule(TestOpenVSwitchModule):
module = openvswitch_port
def setUp(self):
+ super(TestOpenVSwitchPortModule, self).setUp()
+
self.mock_run_command = (
patch('ansible.module_utils.basic.AnsibleModule.run_command'))
self.run_command = self.mock_run_command.start()
@@ -83,6 +84,8 @@ class TestOpenVSwitchPortModule(TestOpenVSwitchModule):
self.get_bin_path = self.mock_get_bin_path.start()
def tearDown(self):
+ super(TestOpenVSwitchPortModule, self).tearDown()
+
self.mock_run_command.stop()
self.mock_get_bin_path.stop()