aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/tests/test_objects.py
diff options
context:
space:
mode:
Diffstat (limited to 'os_net_config/tests/test_objects.py')
-rw-r--r--os_net_config/tests/test_objects.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/os_net_config/tests/test_objects.py b/os_net_config/tests/test_objects.py
index d3e41df..a4a5f8a 100644
--- a/os_net_config/tests/test_objects.py
+++ b/os_net_config/tests/test_objects.py
@@ -569,3 +569,9 @@ class TestNumberedNicsMapping(base.TestCase):
mapping = {'nic1': '12:34:56:de:f0:12', 'nic2': '12:34:56:78:9a:bc'}
expected = {'nic1': 'em2', 'nic2': 'em1'}
self.assertEqual(expected, objects._numbered_nics(nic_mapping=mapping))
+
+ def test_numbered_nics_no_active(self):
+ self._stub_active_nics([])
+ expected = {}
+ # This only emits a warning, so it should still work
+ self.assertEqual(expected, objects._numbered_nics())