From 24ba2035048566df2e0876fb719749d984234bc7 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 26 Feb 2014 10:25:02 +0100 Subject: 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. --- Lib/asyncio/test_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/asyncio/test_utils.py') diff --git a/Lib/asyncio/test_utils.py b/Lib/asyncio/test_utils.py index dd87789f8b2..9a9a10b4bd0 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): -- cgit v1.2.3