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

Actually check for equality on empty commands array (#25308)

This commit is contained in:
Nathaniel Case 2017-06-06 09:56:44 -04:00 committed by GitHub
parent 0133a5a763
commit f52dcef7ba
7 changed files with 8 additions and 10 deletions

View file

@ -75,7 +75,7 @@ class TestEosModule(unittest.TestCase):
result = self.changed(changed)
self.assertEqual(result['changed'], changed, result)
if commands:
if commands is not None:
if sort:
self.assertEqual(sorted(commands), sorted(result['commands']), result['commands'])
else:

View file

@ -95,8 +95,7 @@ class TestEosEapiModule(TestEosModule):
def test_eos_eapi_http_invalid(self):
set_module_args(dict(http_port=80000))
commands = []
self.start_unconfigured(failed=True, commands=commands)
self.start_unconfigured(failed=True)
def test_eos_eapi_https_enable(self):
set_module_args(dict(https=True))
@ -137,8 +136,7 @@ class TestEosEapiModule(TestEosModule):
def test_eos_eapi_vrf_missing(self):
set_module_args(dict(vrf='missing'))
commands = []
self.start_unconfigured(failed=True, commands=commands)
self.start_unconfigured(failed=True)
def test_eos_eapi_state_absent(self):
set_module_args(dict(state='stopped'))

View file

@ -75,7 +75,7 @@ class TestIosModule(unittest.TestCase):
result = self.changed(changed)
self.assertEqual(result['changed'], changed, result)
if commands:
if commands is not None:
if sort:
self.assertEqual(sorted(commands), sorted(result['commands']), result['commands'])
else:

View file

@ -75,7 +75,7 @@ class TestIosxrModule(unittest.TestCase):
result = self.changed(changed)
self.assertEqual(result['changed'], changed, result)
if commands:
if commands is not None:
if sort:
self.assertEqual(sorted(commands), sorted(result['commands']), result['commands'])
else:

View file

@ -75,7 +75,7 @@ class TestNxosModule(unittest.TestCase):
result = self.changed(changed)
self.assertEqual(result['changed'], changed, result)
if commands:
if commands is not None:
if sort:
self.assertEqual(sorted(commands), sorted(result['commands']), result['commands'])
else:

View file

@ -76,7 +76,7 @@ class TestOpenVSwitchModule(unittest.TestCase):
result = self.changed(changed)
self.assertEqual(result['changed'], changed, result)
if commands:
if commands is not None:
self.assertEqual(commands, result['commands'], result['commands'])
return result

View file

@ -74,7 +74,7 @@ class TestVyosModule(unittest.TestCase):
result = self.changed(changed)
self.assertEqual(result['changed'], changed, result)
if commands:
if commands is not None:
if sort:
self.assertEqual(sorted(commands), sorted(result['commands']), result['commands'])
else: