1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix vyos unit tests.

This commit is contained in:
Matt Clay 2017-02-07 14:19:16 -08:00
parent d12e9f5748
commit 189fee4853

View file

@ -30,6 +30,7 @@ from ansible.compat.tests.mock import patch, MagicMock
from ansible.errors import AnsibleModuleExit from ansible.errors import AnsibleModuleExit
from ansible.modules.network.vyos import vyos_system from ansible.modules.network.vyos import vyos_system
from ansible.module_utils._text import to_bytes from ansible.module_utils._text import to_bytes
from ansible.module_utils import basic
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
@ -38,7 +39,7 @@ fixture_data = {}
def set_module_args(args): def set_module_args(args):
json_args = json.dumps({'ANSIBLE_MODULE_ARGS': args}) json_args = json.dumps({'ANSIBLE_MODULE_ARGS': args})
ansible.module_utils.basic._ANSIBLE_ARGS = to_bytes(json_args) basic._ANSIBLE_ARGS = to_bytes(json_args)
def load_fixture(name): def load_fixture(name):