diff --git a/test/test_network.py b/test/test_network.py index 26b67120..b646cfd1 100644 --- a/test/test_network.py +++ b/test/test_network.py @@ -110,7 +110,7 @@ def periodicity(): # so allow a single failure. bus = self.network.bus msg = bus.recv(TIMEOUT) - if msg: + if msg is not None: self.assertIsNone(bus.recv(TIMEOUT)) diff --git a/test/test_nmt.py b/test/test_nmt.py index ca40ab59..059e1982 100644 --- a/test/test_nmt.py +++ b/test/test_nmt.py @@ -120,7 +120,7 @@ def test_nmt_master_node_guarding(self): # A message may have been in flight when we stopped the timer, # so allow a single failure. msg = self.bus.recv(self.TIMEOUT) - if msg: + if msg is not None: self.assertIsNone(self.bus.recv(self.TIMEOUT))