From 2c5cf4e6677386cb182f00444e0b3ed248e97923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Mon, 7 May 2018 18:59:08 +0200 Subject: [PATCH] Fix dnsmasq filter nits This patch fixes a couple of nits in the unit tests. Also removes an entry from the docstring of _configure_unknown_hosts that is not valid. Change-Id: I3785bfedf5441e7b21a96b49b05ec910270358e4 --- ironic_inspector/pxe_filter/dnsmasq.py | 2 -- ironic_inspector/test/unit/test_dnsmasq_pxe_filter.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ironic_inspector/pxe_filter/dnsmasq.py b/ironic_inspector/pxe_filter/dnsmasq.py index a69c372a7..cd2527666 100644 --- a/ironic_inspector/pxe_filter/dnsmasq.py +++ b/ironic_inspector/pxe_filter/dnsmasq.py @@ -205,8 +205,6 @@ def _exclusive_write_or_pass(path, buf): def _configure_unknown_hosts(): """Manages a dhcp_hostsdir ignore/not-ignore record for unknown macs. - :param allow: If True unknown hosts are whitelisted. If False unknown hosts - are blacklisted. :raises: FileNotFoundError in case the dhcp_hostsdir is invalid, IOError in case the dhcp host unknown file isn't writable. :returns: None. diff --git a/ironic_inspector/test/unit/test_dnsmasq_pxe_filter.py b/ironic_inspector/test/unit/test_dnsmasq_pxe_filter.py index ce4ad406d..17819e666 100644 --- a/ironic_inspector/test/unit/test_dnsmasq_pxe_filter.py +++ b/ironic_inspector/test/unit/test_dnsmasq_pxe_filter.py @@ -42,11 +42,11 @@ class TestShouldEnableUnknownHosts(DnsmasqTestBase): def test_introspection_active(self): self.mock_introspection_active.return_value = True - self.assertIs(True, dnsmasq._should_enable_unknown_hosts()) + self.assertTrue(dnsmasq._should_enable_unknown_hosts()) def test_introspection_not_active(self): self.mock_introspection_active.return_value = False - self.assertIs(False, dnsmasq._should_enable_unknown_hosts()) + self.assertFalse(dnsmasq._should_enable_unknown_hosts()) class TestDnsmasqDriverAPI(DnsmasqTestBase):