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_windows_utils.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_windows_utils.py')
-rw-r--r-- | Lib/test/test_asyncio/test_windows_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_windows_utils.py b/Lib/test/test_asyncio/test_windows_utils.py index fa9d66c..7616c73 100644 --- a/Lib/test/test_asyncio/test_windows_utils.py +++ b/Lib/test/test_asyncio/test_windows_utils.py @@ -3,7 +3,7 @@ import sys import test.support import unittest -import unittest.mock +from unittest import mock if sys.platform != 'win32': raise unittest.SkipTest('Windows only') @@ -25,7 +25,7 @@ class WinsocketpairTests(unittest.TestCase): csock.close() ssock.close() - @unittest.mock.patch('asyncio.windows_utils.socket') + @mock.patch('asyncio.windows_utils.socket') def test_winsocketpair_exc(self, m_socket): m_socket.socket.return_value.getsockname.return_value = ('', 12345) m_socket.socket.return_value.accept.return_value = object(), object() |