summaryrefslogtreecommitdiff
path: root/Lib/asyncio/test_utils.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-02-26 10:25:02 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-02-26 10:25:02 +0100
commitdc1726fa577df2406699a006fe667ea7680a0039 (patch)
tree5eed9af09eb25bf7c841ddca5fc174b48b9cf5a9 /Lib/asyncio/test_utils.py
parent63cb24a5e7a79a36f4d48125327c9c90809f023d (diff)
downloadcpython-dc1726fa577df2406699a006fe667ea7680a0039.tar.gz
asyncio: Replace "unittest.mock" with "mock" in unit tests
Use "from unittest import mock". It should simplify my work to merge new tests in Trollius, because Trollius uses "mock" backport for Python 2.
Diffstat (limited to 'Lib/asyncio/test_utils.py')
-rw-r--r--Lib/asyncio/test_utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncio/test_utils.py b/Lib/asyncio/test_utils.py
index dd87789f8b..9a9a10b4bd 100644
--- a/Lib/asyncio/test_utils.py
+++ b/Lib/asyncio/test_utils.py
@@ -12,7 +12,7 @@ import tempfile
import threading
import time
import unittest
-import unittest.mock
+from unittest import mock
from http.server import HTTPServer
from wsgiref.simple_server import WSGIRequestHandler, WSGIServer
@@ -362,7 +362,7 @@ class TestLoop(base_events.BaseEventLoop):
def MockCallback(**kwargs):
- return unittest.mock.Mock(spec=['__call__'], **kwargs)
+ return mock.Mock(spec=['__call__'], **kwargs)
class MockPattern(str):