Skip to content

Commit

Permalink
test: More iputils tests
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Belanger <[email protected]>
  • Loading branch information
Martin Belanger committed Mar 21, 2023
1 parent 78fb7ae commit c6a4050
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test-iputil.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/python3
import json
import shutil
import socket
import logging
import unittest
import ipaddress
Expand Down Expand Up @@ -61,6 +62,12 @@ def test_remove_invalid_addresses(self):
self.assertNotIn(bad_tcp, l2)
self.assertNotIn(bad_trtype, l2)

def test__data_matches_ip(self):
self.assertFalse(iputil._data_matches_ip(None, None, None))
self.assertFalse(iputil._data_matches_ip(socket.AF_INET, None, None))
self.assertFalse(iputil._data_matches_ip(socket.AF_INET6, None, None))



if __name__ == "__main__":
unittest.main()

0 comments on commit c6a4050

Please sign in to comment.