summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_streams.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-02-26 09:25:02 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-02-26 09:25:02 (GMT)
commit24ba2035048566df2e0876fb719749d984234bc7 (patch)
treed7e3aea3b21b945a2f475247384878ca7723a415 /Lib/test/test_asyncio/test_streams.py
parent71ec82a501d95c43aa6c3559e8dbd05aad23eb50 (diff)
downloadcpython-24ba2035048566df2e0876fb719749d984234bc7.zip
cpython-24ba2035048566df2e0876fb719749d984234bc7.tar.gz
cpython-24ba2035048566df2e0876fb719749d984234bc7.tar.bz2
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/test/test_asyncio/test_streams.py')
-rw-r--r--Lib/test/test_asyncio/test_streams.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py
index ca792f2..e921dfe 100644
--- a/Lib/test/test_asyncio/test_streams.py
+++ b/Lib/test/test_asyncio/test_streams.py
@@ -4,7 +4,7 @@ import functools
import gc
import socket
import unittest
-import unittest.mock
+from unittest import mock
try:
import ssl
except ImportError:
@@ -29,7 +29,7 @@ class StreamReaderTests(unittest.TestCase):
self.loop.close()
gc.collect()
- @unittest.mock.patch('asyncio.streams.events')
+ @mock.patch('asyncio.streams.events')
def test_ctor_global_loop(self, m_events):
stream = asyncio.StreamReader()
self.assertIs(stream._loop, m_events.get_event_loop.return_value)