diff options
Diffstat (limited to 'tests/unit/modules')
37 files changed, 19 insertions, 57 deletions
diff --git a/tests/unit/modules/conftest.py b/tests/unit/modules/conftest.py index 0f36839e..b084d2f0 100644 --- a/tests/unit/modules/conftest.py +++ b/tests/unit/modules/conftest.py @@ -2,7 +2,6 @@ # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function - __metaclass__ = type import json diff --git a/tests/unit/modules/network/vyos/test_vyos_banner.py b/tests/unit/modules/network/vyos/test_vyos_banner.py index d418a27c..c15ed8af 100644 --- a/tests/unit/modules/network/vyos/test_vyos_banner.py +++ b/tests/unit/modules/network/vyos/test_vyos_banner.py @@ -16,7 +16,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_bgp_address_family.py b/tests/unit/modules/network/vyos/test_vyos_bgp_address_family.py index 7ea9b2cd..9d6f6297 100644 --- a/tests/unit/modules/network/vyos/test_vyos_bgp_address_family.py +++ b/tests/unit/modules/network/vyos/test_vyos_bgp_address_family.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch @@ -701,13 +700,13 @@ class TestVyosBgpafOpsModule13(TestVyosModule): ], redistribute=[ dict(protocol="ospf", metric=25), - ] + ], ), dict( afi="ipv6", redistribute=[ dict(protocol="ospfv3", metric=20), - dict(protocol="ripng") + dict(protocol="ripng"), ], ), ], @@ -738,13 +737,13 @@ class TestVyosBgpafOpsModule13(TestVyosModule): ], redistribute=[ dict(protocol="ospf", metric=25), - ] + ], ), dict( afi="ipv6", redistribute=[ dict(protocol="ospfv3", metric=20), - dict(protocol="ripng") + dict(protocol="ripng"), ], ), ], @@ -772,7 +771,7 @@ class TestVyosBgpafOpsModule13(TestVyosModule): afi="ipv4", networks=[ dict(prefix="192.2.13.0/24"), - ] + ], ), dict( afi="ipv6", diff --git a/tests/unit/modules/network/vyos/test_vyos_bgp_address_family14.py b/tests/unit/modules/network/vyos/test_vyos_bgp_address_family14.py index c0c661ad..447e324f 100644 --- a/tests/unit/modules/network/vyos/test_vyos_bgp_address_family14.py +++ b/tests/unit/modules/network/vyos/test_vyos_bgp_address_family14.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_bgp_global.py b/tests/unit/modules/network/vyos/test_vyos_bgp_global.py index e363f77b..c3680492 100644 --- a/tests/unit/modules/network/vyos/test_vyos_bgp_global.py +++ b/tests/unit/modules/network/vyos/test_vyos_bgp_global.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_bgp_global14.py b/tests/unit/modules/network/vyos/test_vyos_bgp_global14.py index ee647616..cf4a377b 100644 --- a/tests/unit/modules/network/vyos/test_vyos_bgp_global14.py +++ b/tests/unit/modules/network/vyos/test_vyos_bgp_global14.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_command.py b/tests/unit/modules/network/vyos/test_vyos_command.py index 2c7cd328..a0ad0942 100644 --- a/tests/unit/modules/network/vyos/test_vyos_command.py +++ b/tests/unit/modules/network/vyos/test_vyos_command.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_config.py b/tests/unit/modules/network/vyos/test_vyos_config.py index 601971cd..e732ca60 100644 --- a/tests/unit/modules/network/vyos/test_vyos_config.py +++ b/tests/unit/modules/network/vyos/test_vyos_config.py @@ -19,7 +19,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import MagicMock, patch diff --git a/tests/unit/modules/network/vyos/test_vyos_facts.py b/tests/unit/modules/network/vyos/test_vyos_facts.py index 7e192e3c..3f85bf7d 100644 --- a/tests/unit/modules/network/vyos/test_vyos_facts.py +++ b/tests/unit/modules/network/vyos/test_vyos_facts.py @@ -17,7 +17,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type import json diff --git a/tests/unit/modules/network/vyos/test_vyos_firewall_global.py b/tests/unit/modules/network/vyos/test_vyos_firewall_global.py index 862bf06c..f62ed4b8 100644 --- a/tests/unit/modules/network/vyos/test_vyos_firewall_global.py +++ b/tests/unit/modules/network/vyos/test_vyos_firewall_global.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch @@ -425,8 +424,8 @@ class TestVyosFirewallGlobalModule(TestVyosModule): name="DELETE-HOSTS", description="The (single) last address from this group will be deleted in the tests", members=[ - dict(address='1.2.3.4'), - ] + dict(address="1.2.3.4"), + ], ), dict( afi="ipv6", diff --git a/tests/unit/modules/network/vyos/test_vyos_firewall_global14.py b/tests/unit/modules/network/vyos/test_vyos_firewall_global14.py index b8bca0cc..a7abfe8c 100644 --- a/tests/unit/modules/network/vyos/test_vyos_firewall_global14.py +++ b/tests/unit/modules/network/vyos/test_vyos_firewall_global14.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch @@ -380,15 +379,15 @@ class TestVyosFirewallRulesModule14(TestVyosModule): name="DELETE-HOSTS", description="The (single) last address from this group will be deleted in the tests", members=[ - dict(address='1.2.3.4'), - ] + dict(address="1.2.3.4"), + ], ), dict( afi="ipv4", name="ZONE-TEST", members=[ dict(address="1.2.3.4"), - ] + ], ), dict( afi="ipv6", diff --git a/tests/unit/modules/network/vyos/test_vyos_firewall_interfaces.py b/tests/unit/modules/network/vyos/test_vyos_firewall_interfaces.py index f921c508..2b995652 100644 --- a/tests/unit/modules/network/vyos/test_vyos_firewall_interfaces.py +++ b/tests/unit/modules/network/vyos/test_vyos_firewall_interfaces.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch @@ -437,19 +436,19 @@ class TestVyosFirewallInterfacesModule(TestVyosModule): ), ) commands = [ - 'delete interfaces ethernet eth0 firewall in name', - 'delete interfaces ethernet eth0 firewall local name', - 'delete interfaces ethernet eth0 firewall out name', - 'delete interfaces ethernet eth0 firewall local ipv6-name', - 'delete interfaces ethernet eth2 firewall in name', - 'delete interfaces ethernet eth2 firewall local name', - 'delete interfaces ethernet eth2 firewall out name', - 'delete interfaces ethernet eth2 firewall local ipv6-name', + "delete interfaces ethernet eth0 firewall in name", + "delete interfaces ethernet eth0 firewall local name", + "delete interfaces ethernet eth0 firewall out name", + "delete interfaces ethernet eth0 firewall local ipv6-name", + "delete interfaces ethernet eth2 firewall in name", + "delete interfaces ethernet eth2 firewall local name", + "delete interfaces ethernet eth2 firewall out name", + "delete interfaces ethernet eth2 firewall local ipv6-name", "set interfaces ethernet eth0 vif 100 firewall in name 'INBOUND'", "set interfaces ethernet eth0 vif 100 firewall local ipv6-name 'V6-LOCAL'", "set interfaces bonding bond2 firewall local name 'LOCAL'", "set interfaces bonding bond2 firewall local ipv6-name 'V6-LOCAL'", "set interfaces wireguard wg4 firewall local name 'LOCAL'", - "set interfaces wireguard wg4 firewall local ipv6-name 'V6-LOCAL'" + "set interfaces wireguard wg4 firewall local ipv6-name 'V6-LOCAL'", ] self.execute_module(changed=True, commands=commands) diff --git a/tests/unit/modules/network/vyos/test_vyos_firewall_rules13.py b/tests/unit/modules/network/vyos/test_vyos_firewall_rules13.py index edce123b..457fc76b 100644 --- a/tests/unit/modules/network/vyos/test_vyos_firewall_rules13.py +++ b/tests/unit/modules/network/vyos/test_vyos_firewall_rules13.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_firewall_rules14.py b/tests/unit/modules/network/vyos/test_vyos_firewall_rules14.py index 84243dae..67ed216e 100644 --- a/tests/unit/modules/network/vyos/test_vyos_firewall_rules14.py +++ b/tests/unit/modules/network/vyos/test_vyos_firewall_rules14.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_hostname.py b/tests/unit/modules/network/vyos/test_vyos_hostname.py index a056f6ba..3101cacc 100644 --- a/tests/unit/modules/network/vyos/test_vyos_hostname.py +++ b/tests/unit/modules/network/vyos/test_vyos_hostname.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_interfaces.py b/tests/unit/modules/network/vyos/test_vyos_interfaces.py index f4a5d2a5..d135202c 100644 --- a/tests/unit/modules/network/vyos/test_vyos_interfaces.py +++ b/tests/unit/modules/network/vyos/test_vyos_interfaces.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_lag_interfaces.py b/tests/unit/modules/network/vyos/test_vyos_lag_interfaces.py index 406ca598..41ba88a4 100644 --- a/tests/unit/modules/network/vyos/test_vyos_lag_interfaces.py +++ b/tests/unit/modules/network/vyos/test_vyos_lag_interfaces.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_lldp_global.py b/tests/unit/modules/network/vyos/test_vyos_lldp_global.py index 0dc1a8d7..ef5233ce 100644 --- a/tests/unit/modules/network/vyos/test_vyos_lldp_global.py +++ b/tests/unit/modules/network/vyos/test_vyos_lldp_global.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_logging_global.py b/tests/unit/modules/network/vyos/test_vyos_logging_global.py index 54288b6e..a1ab3c6c 100644 --- a/tests/unit/modules/network/vyos/test_vyos_logging_global.py +++ b/tests/unit/modules/network/vyos/test_vyos_logging_global.py @@ -5,7 +5,6 @@ from __future__ import absolute_import, division, print_function - __metaclass__ = type from textwrap import dedent diff --git a/tests/unit/modules/network/vyos/test_vyos_ntp_global.py b/tests/unit/modules/network/vyos/test_vyos_ntp_global.py index b8adeae7..e14eb43f 100644 --- a/tests/unit/modules/network/vyos/test_vyos_ntp_global.py +++ b/tests/unit/modules/network/vyos/test_vyos_ntp_global.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_ospf_interfaces.py b/tests/unit/modules/network/vyos/test_vyos_ospf_interfaces.py index b0a0f0ff..09fcae61 100644 --- a/tests/unit/modules/network/vyos/test_vyos_ospf_interfaces.py +++ b/tests/unit/modules/network/vyos/test_vyos_ospf_interfaces.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_ospf_interfaces14.py b/tests/unit/modules/network/vyos/test_vyos_ospf_interfaces14.py index d3f8bc38..af1418db 100644 --- a/tests/unit/modules/network/vyos/test_vyos_ospf_interfaces14.py +++ b/tests/unit/modules/network/vyos/test_vyos_ospf_interfaces14.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_ospfv2.py b/tests/unit/modules/network/vyos/test_vyos_ospfv2.py index 2620b1cd..51af858e 100644 --- a/tests/unit/modules/network/vyos/test_vyos_ospfv2.py +++ b/tests/unit/modules/network/vyos/test_vyos_ospfv2.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_ospfv2v14.py b/tests/unit/modules/network/vyos/test_vyos_ospfv2v14.py index 5c77cb88..58ceb57b 100644 --- a/tests/unit/modules/network/vyos/test_vyos_ospfv2v14.py +++ b/tests/unit/modules/network/vyos/test_vyos_ospfv2v14.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_ospfv3.py b/tests/unit/modules/network/vyos/test_vyos_ospfv3.py index bdd93612..0fc83b85 100644 --- a/tests/unit/modules/network/vyos/test_vyos_ospfv3.py +++ b/tests/unit/modules/network/vyos/test_vyos_ospfv3.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_ping.py b/tests/unit/modules/network/vyos/test_vyos_ping.py index 28216962..8d2ce595 100644 --- a/tests/unit/modules/network/vyos/test_vyos_ping.py +++ b/tests/unit/modules/network/vyos/test_vyos_ping.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_prefix_lists.py b/tests/unit/modules/network/vyos/test_vyos_prefix_lists.py index 3da58f72..bd8ade4b 100644 --- a/tests/unit/modules/network/vyos/test_vyos_prefix_lists.py +++ b/tests/unit/modules/network/vyos/test_vyos_prefix_lists.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from textwrap import dedent diff --git a/tests/unit/modules/network/vyos/test_vyos_route_maps.py b/tests/unit/modules/network/vyos/test_vyos_route_maps.py index db83ea40..9ff5e073 100644 --- a/tests/unit/modules/network/vyos/test_vyos_route_maps.py +++ b/tests/unit/modules/network/vyos/test_vyos_route_maps.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_route_maps14.py b/tests/unit/modules/network/vyos/test_vyos_route_maps14.py index 7bc5b74e..b60ad44a 100644 --- a/tests/unit/modules/network/vyos/test_vyos_route_maps14.py +++ b/tests/unit/modules/network/vyos/test_vyos_route_maps14.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_snmp_server.py b/tests/unit/modules/network/vyos/test_vyos_snmp_server.py index 9ac650bf..91abb69f 100644 --- a/tests/unit/modules/network/vyos/test_vyos_snmp_server.py +++ b/tests/unit/modules/network/vyos/test_vyos_snmp_server.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_static_routes.py b/tests/unit/modules/network/vyos/test_vyos_static_routes.py index 71f1fbf1..955c997a 100644 --- a/tests/unit/modules/network/vyos/test_vyos_static_routes.py +++ b/tests/unit/modules/network/vyos/test_vyos_static_routes.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_static_routes14.py b/tests/unit/modules/network/vyos/test_vyos_static_routes14.py index e5e40823..2dd4c0aa 100644 --- a/tests/unit/modules/network/vyos/test_vyos_static_routes14.py +++ b/tests/unit/modules/network/vyos/test_vyos_static_routes14.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_system.py b/tests/unit/modules/network/vyos/test_vyos_system.py index 5edfa0df..56874cba 100644 --- a/tests/unit/modules/network/vyos/test_vyos_system.py +++ b/tests/unit/modules/network/vyos/test_vyos_system.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_user.py b/tests/unit/modules/network/vyos/test_vyos_user.py index 2cbd3820..0e60f07e 100644 --- a/tests/unit/modules/network/vyos/test_vyos_user.py +++ b/tests/unit/modules/network/vyos/test_vyos_user.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import patch diff --git a/tests/unit/modules/network/vyos/test_vyos_vrf.py b/tests/unit/modules/network/vyos/test_vyos_vrf.py index e86227a9..aa6284a0 100644 --- a/tests/unit/modules/network/vyos/test_vyos_vrf.py +++ b/tests/unit/modules/network/vyos/test_vyos_vrf.py @@ -18,7 +18,6 @@ from __future__ import absolute_import, division, print_function - __metaclass__ = type from unittest.mock import MagicMock, patch diff --git a/tests/unit/modules/network/vyos/vyos_module.py b/tests/unit/modules/network/vyos/vyos_module.py index 60d94b5a..b1bdc2ec 100644 --- a/tests/unit/modules/network/vyos/vyos_module.py +++ b/tests/unit/modules/network/vyos/vyos_module.py @@ -18,7 +18,6 @@ # Make coding more python3-ish from __future__ import absolute_import, division, print_function - __metaclass__ = type import json @@ -30,7 +29,6 @@ from ansible_collections.vyos.vyos.tests.unit.modules.utils import ( ModuleTestCase, ) - fixture_path = os.path.join(os.path.dirname(__file__), "fixtures") fixture_data = {} diff --git a/tests/unit/modules/utils.py b/tests/unit/modules/utils.py index e2d17abd..c2a19070 100644 --- a/tests/unit/modules/utils.py +++ b/tests/unit/modules/utils.py @@ -1,6 +1,5 @@ from __future__ import absolute_import, division, print_function - __metaclass__ = type import json import unittest |
