Skip to content

Commit

Permalink
[ci] Remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
opoplawski committed Dec 31, 2023
1 parent 1bdedc0 commit 36db1b7
Show file tree
Hide file tree
Showing 12 changed files with 7 additions and 35 deletions.
8 changes: 0 additions & 8 deletions examples/ipsec/filter_plugins/pfsense.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@
__metaclass__ = type

from ansible.errors import AnsibleFilterError
from ipaddress import ip_network
import re

try:
from __main__ import display
except ImportError:
from ansible.utils.display import Display
display = Display()


def format_ipsec_aggregate_ipsecs(all_tunnels, pfname):
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/plugins/lookup/test_pfsense.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

import os
from collections import OrderedDict
import yaml
from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch
Expand Down Expand Up @@ -43,7 +42,6 @@ def setUp(self):

self.build_definitions()

# self.fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures', 'pfsense.yaml')
self.mock_get_hostname = patch('ansible_collections.pfsensible.core.plugins.lookup.pfsense.LookupModule.get_hostname')
get_hostname = self.mock_get_hostname.start()
get_hostname.return_value = ('pf_test1')
Expand Down
1 change: 0 additions & 1 deletion tests/unit/plugins/modules/test_pfsense_alias_null.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

from copy import copy
import pytest
import sys

Expand Down
4 changes: 1 addition & 3 deletions tests/unit/plugins/modules/test_pfsense_authserver_ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
if sys.version_info < (2, 7):
pytestmark = pytest.mark.skip("pfSense Ansible modules require Python >= 2.7")

from xml.etree.ElementTree import fromstring, ElementTree
from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch
from ansible_collections.pfsensible.core.plugins.modules import pfsense_authserver_ldap
from .pfsense_module import TestPFSenseModule, load_fixture
from .pfsense_module import TestPFSenseModule


class TestPFSenseAuthserverLDAPModule(TestPFSenseModule):
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/plugins/modules/test_pfsense_authserver_radius.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
if sys.version_info < (2, 7):
pytestmark = pytest.mark.skip("pfSense Ansible modules require Python >= 2.7")

from xml.etree.ElementTree import fromstring, ElementTree
from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch
from ansible_collections.pfsensible.core.plugins.modules import pfsense_authserver_radius
from .pfsense_module import TestPFSenseModule, load_fixture
from .pfsense_module import TestPFSenseModule


class TestPFSenseAuthserverRADIUSModule(TestPFSenseModule):
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/plugins/modules/test_pfsense_ca.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
if sys.version_info < (2, 7):
pytestmark = pytest.mark.skip("pfSense Ansible modules require Python >= 2.7")

from xml.etree.ElementTree import fromstring, ElementTree
from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch
from ansible_collections.pfsensible.core.plugins.modules import pfsense_ca
from .pfsense_module import TestPFSenseModule, load_fixture
from .pfsense_module import TestPFSenseModule

CERTIFICATE = (
"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tDQpNSUlFQ0RDQ0F2Q2dBd0lCQWdJSUZqRk9oczFuTXpRd0RRWUpLb1pJaHZjTkFRRUxCUUF3WERFVE1CRUdBMVVFDQpBeE1LYjNCbGJuWndiaTFqWVRF"
Expand Down
1 change: 0 additions & 1 deletion tests/unit/plugins/modules/test_pfsense_ipsec.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from ansible_collections.pfsensible.core.plugins.modules import pfsense_ipsec
from ansible_collections.pfsensible.core.plugins.module_utils.ipsec import PFSenseIpsecModule
from .pfsense_module import TestPFSenseModule
from parameterized import parameterized


class TestPFSenseIpsecModule(TestPFSenseModule):
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/plugins/modules/test_pfsense_log_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

from copy import copy
import pytest
import sys

if sys.version_info < (2, 7):
pytestmark = pytest.mark.skip("pfSense Ansible modules require Python >= 2.7")

from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import set_module_args
from ansible_collections.pfsensible.core.plugins.modules import pfsense_log_settings

from .pfsense_module import TestPFSenseModule
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/plugins/modules/test_pfsense_openvpn_override.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
if sys.version_info < (2, 7):
pytestmark = pytest.mark.skip("pfSense Ansible modules require Python >= 2.7")

from xml.etree.ElementTree import fromstring, ElementTree
from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch
from ansible_collections.pfsensible.core.plugins.modules import pfsense_openvpn_override
from .pfsense_module import TestPFSenseModule, load_fixture
from .pfsense_module import TestPFSenseModule


class TestPFSenseOpenVPNOverrideModule(TestPFSenseModule):
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/plugins/modules/test_pfsense_openvpn_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
if sys.version_info < (2, 7):
pytestmark = pytest.mark.skip("pfSense Ansible modules require Python >= 2.7")

from xml.etree.ElementTree import fromstring, ElementTree
from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch
from ansible_collections.pfsensible.core.plugins.modules import pfsense_openvpn_server
from .pfsense_module import TestPFSenseModule, load_fixture
from .pfsense_module import TestPFSenseModule

CERTIFICATE = (
"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tDQpNSUlFQ0RDQ0F2Q2dBd0lCQWdJSUZqRk9oczFuTXpRd0RRWUpLb1pJaHZjTkFRRUxCUUF3WERFVE1CRUdBMVVFDQpBeE1LYjNCbGJuWndiaTFqWVRF"
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/plugins/modules/test_pfsense_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
if sys.version_info < (2, 7):
pytestmark = pytest.mark.skip("pfSense Ansible modules require Python >= 2.7")

from xml.etree.ElementTree import fromstring, ElementTree
from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch
from ansible_collections.pfsensible.core.plugins.modules import pfsense_rule
from ansible_collections.pfsensible.core.plugins.module_utils.rule import PFSenseRuleModule
from .pfsense_module import TestPFSenseModule, load_fixture
from .pfsense_module import TestPFSenseModule


class TestPFSenseRuleModule(TestPFSenseModule):
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/plugins/modules/test_pfsense_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
if sys.version_info < (2, 7):
pytestmark = pytest.mark.skip("pfSense Ansible modules require Python >= 2.7")

from xml.etree.ElementTree import fromstring, ElementTree
from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch
from ansible_collections.pfsensible.core.plugins.modules import pfsense_user
from .pfsense_module import TestPFSenseModule, load_fixture
from .pfsense_module import TestPFSenseModule


class TestPFSenseUserModule(TestPFSenseModule):
Expand Down

0 comments on commit 36db1b7

Please sign in to comment.