summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/ciscosmb/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:18:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:18:34 +0000
commit3667197efb7b18ec842efd504785965911f8ac4b (patch)
tree0b986a4bc6879d080b100666a97cdabbc9ca1f28 /ansible_collections/community/ciscosmb/tests
parentAdding upstream version 9.5.1+dfsg. (diff)
downloadansible-3667197efb7b18ec842efd504785965911f8ac4b.tar.xz
ansible-3667197efb7b18ec842efd504785965911f8ac4b.zip
Adding upstream version 10.0.0+dfsg.upstream/10.0.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/community/ciscosmb/tests')
-rw-r--r--ansible_collections/community/ciscosmb/tests/unit/compat/mock.py6
-rw-r--r--ansible_collections/community/ciscosmb/tests/unit/plugins/modules/ciscosmb/test_ciscosmb_facts-SG500-52-K9.py7
2 files changed, 9 insertions, 4 deletions
diff --git a/ansible_collections/community/ciscosmb/tests/unit/compat/mock.py b/ansible_collections/community/ciscosmb/tests/unit/compat/mock.py
index 0972cd2e8..5d25fbe16 100644
--- a/ansible_collections/community/ciscosmb/tests/unit/compat/mock.py
+++ b/ansible_collections/community/ciscosmb/tests/unit/compat/mock.py
@@ -64,8 +64,7 @@ if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
# newline that our naive format() added
data_as_list[-1] = data_as_list[-1][:-1]
- for line in data_as_list:
- yield line
+ yield data_as_list
def mock_open(mock=None, read_data=''):
"""
@@ -93,8 +92,7 @@ if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
if handle.readline.return_value is not None:
while True:
yield handle.readline.return_value
- for line in _data:
- yield line
+ yield _data
global file_spec
if file_spec is None:
diff --git a/ansible_collections/community/ciscosmb/tests/unit/plugins/modules/ciscosmb/test_ciscosmb_facts-SG500-52-K9.py b/ansible_collections/community/ciscosmb/tests/unit/plugins/modules/ciscosmb/test_ciscosmb_facts-SG500-52-K9.py
index 98a185dd7..107c365ca 100644
--- a/ansible_collections/community/ciscosmb/tests/unit/plugins/modules/ciscosmb/test_ciscosmb_facts-SG500-52-K9.py
+++ b/ansible_collections/community/ciscosmb/tests/unit/plugins/modules/ciscosmb/test_ciscosmb_facts-SG500-52-K9.py
@@ -116,6 +116,13 @@ class TestCiscoSMBFactsModule(TestCiscoSMBModule):
len(result['ansible_facts']['ansible_net_neighbors']), 9
)
+ interfaces = result['ansible_facts']['ansible_net_interfaces']
+ ge42 = interfaces['GigabitEthernet1/42']
+
+ self.assertEqual(ge42['bandwidth'], 1000000)
+
+ self.assertEqual(ge42['bandwidth'], ge42['bandwith'])
+
# def test_ciscosmb_facts_routing(self):
# set_module_args(dict(gather_subset='routing'))
# result = self.execute_module()