mirror of
https://github.com/python/cpython.git
synced 2025-10-26 03:04:41 +00:00
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:
parent
71ec82a501
commit
24ba203504
12 changed files with 368 additions and 368 deletions
|
|
@ -12,7 +12,7 @@
|
|||
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 @@ def _write_to_self(self):
|
|||
|
||||
|
||||
def MockCallback(**kwargs):
|
||||
return unittest.mock.Mock(spec=['__call__'], **kwargs)
|
||||
return mock.Mock(spec=['__call__'], **kwargs)
|
||||
|
||||
|
||||
class MockPattern(str):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue