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.
This commit is contained in:
Victor Stinner 2014-02-26 10:25:02 +01:00
parent 71ec82a501
commit 24ba203504
12 changed files with 368 additions and 368 deletions

View file

@ -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):