Fix test failed on Python 3.4

Fix #1045
This commit is contained in:
Julien Duponchelle 2017-05-23 11:11:13 +02:00
parent 2a8911d19e
commit 54e80d68f8
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -16,9 +16,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import io
import types
import asyncio
import unittest.mock
import collections.abc
class _asyncio_patch:
@ -70,7 +70,7 @@ class AsyncioMagicMock(unittest.mock.MagicMock):
"""
Magic mock returning coroutine
"""
__class__ = collections.abc.Awaitable
__class__ = types.CoroutineType
def __init__(self, return_value=None, return_values=None, **kwargs):
"""