diff options
author | Abhishek Kekane <abhishek.kekane@nttdata.com> | 2016-05-23 12:10:37 +0530 |
---|---|---|
committer | Abhishek Kekane <abhishek.kekane@nttdata.com> | 2016-05-23 12:17:07 +0530 |
commit | 388a15e6c0ea8d3ac83daef2794c0ab4c53a97d1 (patch) | |
tree | 196ba7ef8c9a460e7a0309d1d65b54ab6a8a2a82 /oslo_utils/tests/test_netutils.py | |
parent | 6cf8386cc7278a98f9ba9260d7ea61e519e93975 (diff) | |
download | oslo-utils-388a15e6c0ea8d3ac83daef2794c0ab4c53a97d1.tar.gz |
Fix is_valid_cidr raises TypeError
is_valid_cidr raises TypeError if invalid addr type is passed.
Caught TypeError to return False if addr type is other than
expected.
Change-Id: I2bb6070e96eb07a47aab12eeef2840ca4f6abc1e
Closes-Bug: #1584599
Diffstat (limited to 'oslo_utils/tests/test_netutils.py')
-rw-r--r-- | oslo_utils/tests/test_netutils.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/oslo_utils/tests/test_netutils.py b/oslo_utils/tests/test_netutils.py index d80f6b7..9b15d61 100644 --- a/oslo_utils/tests/test_netutils.py +++ b/oslo_utils/tests/test_netutils.py @@ -190,6 +190,7 @@ class NetworkUtilsTest(test_base.BaseTestCase): self.assertFalse(netutils.is_valid_cidr('10.0.0.1')) self.assertFalse(netutils.is_valid_cidr('10.0.0.1/33')) + self.assertFalse(netutils.is_valid_cidr(10)) def test_valid_port(self): valid_inputs = [1, '1', 2, '3', '5', 8, 13, 21, |