Skip to content

Instantly share code, notes, and snippets.

@richm
Created July 16, 2021 15:47
Show Gist options
  • Save richm/0514e792187e9e38e007a547358c2415 to your computer and use it in GitHub Desktop.
Save richm/0514e792187e9e38e007a547358c2415 to your computer and use it in GitHub Desktop.
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import os
import tempfile
from ansible_collections.ansible.posix.tests.unit.compat import unittest
from ansible_collections.ansible.posix.tests.unit.compat.mock import patch, MagicMock
from ansible_collections.ansible.posix.plugins.module_utils.firewalld import FirewallTransaction
class FirewallTransactionTestCase(unittest.TestCase):
@patch('ansible_collections.ansible.posix.plugins.module_utils.firewalld.fw', MagicMock())
def test_init(self):
module = MagicMock(name='AnsibleModule')
fwt = FirewallTransaction(module)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment