Fix flake8 errors for iosxr tests (#65860)
These were noticed when we migrated to the cisco.iosxr collection. Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
94be732351
commit
5046413b6d
2 changed files with 6 additions and 8 deletions
|
@ -90,7 +90,6 @@ class TestIosxrConfigModule(TestIosxrModule):
|
|||
def test_iosxr_config_lines_w_parents(self):
|
||||
lines = ['shutdown']
|
||||
parents = ['interface GigabitEthernet0/0']
|
||||
candidate = parents + lines
|
||||
set_module_args(dict(lines=lines, parents=parents))
|
||||
module = MagicMock()
|
||||
module.params = {'lines': lines, 'parents': parents, 'src': None}
|
||||
|
@ -194,29 +193,29 @@ class TestIosxrConfigModule(TestIosxrModule):
|
|||
def test_iosxr_config_src_and_lines_fails(self):
|
||||
args = dict(src='foo', lines='foo')
|
||||
set_module_args(args)
|
||||
result = self.execute_module(failed=True)
|
||||
self.execute_module(failed=True)
|
||||
|
||||
def test_iosxr_config_src_and_parents_fails(self):
|
||||
args = dict(src='foo', parents='foo')
|
||||
set_module_args(args)
|
||||
result = self.execute_module(failed=True)
|
||||
self.execute_module(failed=True)
|
||||
|
||||
def test_iosxr_config_match_exact_requires_lines(self):
|
||||
args = dict(match='exact')
|
||||
set_module_args(args)
|
||||
result = self.execute_module(failed=True)
|
||||
self.execute_module(failed=True)
|
||||
|
||||
def test_iosxr_config_match_strict_requires_lines(self):
|
||||
args = dict(match='strict')
|
||||
set_module_args(args)
|
||||
result = self.execute_module(failed=True)
|
||||
self.execute_module(failed=True)
|
||||
|
||||
def test_iosxr_config_replace_block_requires_lines(self):
|
||||
args = dict(replace='block')
|
||||
set_module_args(args)
|
||||
result = self.execute_module(failed=True)
|
||||
self.execute_module(failed=True)
|
||||
|
||||
def test_iosxr_config_replace_config_requires_src(self):
|
||||
args = dict(replace='config')
|
||||
set_module_args(args)
|
||||
result = self.execute_module(failed=True)
|
||||
self.execute_module(failed=True)
|
||||
|
|
|
@ -80,7 +80,6 @@ class TestIosxrSystemModule(TestIosxrModule):
|
|||
def test_iosxr_system_name_servers(self):
|
||||
name_servers = ['8.8.8.8', '8.8.4.4', '1.1.1.1']
|
||||
set_module_args(dict(name_servers=name_servers))
|
||||
commands = ['domain name-server 1.1.1.1', 'no domain name-server 8.8.4.4', 'no domain lookup disable']
|
||||
self.execute_module(changed=True)
|
||||
|
||||
def test_iosxr_system_state_absent(self):
|
||||
|
|
Loading…
Reference in a new issue