Commit f1be0515 authored by Elena Grandi's avatar Elena Grandi

Fix tests after the changes

parent 191fca0a
......@@ -39,6 +39,9 @@ class TestInotifywatch(InotifyTestCase):
print("UPDATE", file=fd)
# No changes detected while the file is still open
self.assertFalse(watch.has_events())
# we get two events here: one triggered by a MODIFY and
# one triggered by a CLOSE_WRITE
self.assertEqual(await watch.next_event(), "MODIFIED")
self.assertEqual(await watch.next_event(), "MODIFIED")
watch.stop()
self.assertEqual(await watch.next_event(), "END")
......
......@@ -53,7 +53,8 @@ class TestArpwatchDataSource(TestDataSourceMixin, InotifyTestCase):
)
events = events.gathered
self.assertEqual(len(events), 2)
# We receive the events 3 times, but they are the same
self.assertEqual(len(events), 6)
self.assertIsNone(events[0].name)
self.assertEqual(events[0].mac, "52:54:00:5e:76:10")
self.assertEqual(events[0].ip, "192.168.7.241")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment