Skip to content

Commit

Permalink
Merge pull request #349 from martin-belanger/more-iputils-tests
Browse files Browse the repository at this point in the history
test: More iputils tests
  • Loading branch information
martin-belanger authored Mar 21, 2023
2 parents 78fb7ae + d8f6490 commit 642476b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 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,11 @@ 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 642476b

Please sign in to comment.