diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-02-26 09:25:02 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-02-26 09:25:02 (GMT) |
commit | 24ba2035048566df2e0876fb719749d984234bc7 (patch) | |
tree | d7e3aea3b21b945a2f475247384878ca7723a415 /Lib/test/test_asyncio/test_queues.py | |
parent | 71ec82a501d95c43aa6c3559e8dbd05aad23eb50 (diff) | |
download | cpython-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_queues.py')
-rw-r--r-- | Lib/test/test_asyncio/test_queues.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_queues.py b/Lib/test/test_asyncio/test_queues.py index fc2bf46..f79fee2 100644 --- a/Lib/test/test_asyncio/test_queues.py +++ b/Lib/test/test_asyncio/test_queues.py @@ -1,7 +1,7 @@ """Tests for queues.py""" import unittest -import unittest.mock +from unittest import mock import asyncio from asyncio import test_utils @@ -72,7 +72,7 @@ class QueueBasicTests(_QueueTestBase): self.assertTrue('_queue=[1]' in fn(q)) def test_ctor_loop(self): - loop = unittest.mock.Mock() + loop = mock.Mock() q = asyncio.Queue(loop=loop) self.assertIs(q._loop, loop) |