diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-04-22 10:52:29 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-04-22 10:52:29 +0000 |
commit | 60475755e3750b2d2e047578a68c8c2327bf50d7 (patch) | |
tree | fd944be6bb2268714696ac876f25da6e08ce3c86 /os_net_config/tests | |
parent | 2af4ee4b873b30d56c24cf1dfcad7bfabfedab37 (diff) | |
parent | 34f7198267ba855f3f1e6dad0226493acc7f530d (diff) |
Merge "Add warning for no active nics"
Diffstat (limited to 'os_net_config/tests')
-rw-r--r-- | os_net_config/tests/test_objects.py | 6 |
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()) |