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
This commit is contained in:
Harald Jensås 2018-05-07 18:59:08 +02:00
parent 81fd47a3fc
commit 2c5cf4e667
2 changed files with 2 additions and 4 deletions

View File

@ -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.

View File

@ -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):