summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-10-29 18:31:35 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-10-29 18:31:35 +0100
commit2b1737d7bbd2b7455554a7f52c4217b9dea461d3 (patch)
treeba89c39367c75ca901ca5ff494a1c92d0336e071
parent92da08f744d82f7930837374e7596e2579b6fe05 (diff)
downloadtrollius-2b1737d7bbd2b7455554a7f52c4217b9dea461d3.tar.gz
test: pass the event loop, not a mock to Handle
-rw-r--r--tests/test_unix_events.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/test_unix_events.py b/tests/test_unix_events.py
index e397598..3ed14a5 100644
--- a/tests/test_unix_events.py
+++ b/tests/test_unix_events.py
@@ -45,8 +45,7 @@ class SelectorEventLoopSignalTests(test_utils.TestCase):
self.loop._handle_signal(signal.NSIG + 1)
def test_handle_signal_cancelled_handler(self):
- h = asyncio.Handle(mock.Mock(), (),
- loop=mock.Mock())
+ h = asyncio.Handle(mock.Mock(), (), loop=self.loop)
h.cancel()
self.loop._signal_handlers[signal.NSIG + 1] = h
self.loop.remove_signal_handler = mock.Mock()