mirror of https://github.com/scrapy/scrapy.git
Move the asyncio downloader mw test to a separate class.
This commit is contained in:
parent
3603644552
commit
5cf1ac0005
|
|
@ -1,6 +1,7 @@
|
|||
import asyncio
|
||||
from unittest import mock
|
||||
|
||||
from pytest import mark
|
||||
from twisted.internet import defer
|
||||
from twisted.internet.defer import Deferred
|
||||
from twisted.trial.unittest import TestCase
|
||||
|
|
@ -232,6 +233,12 @@ class MiddlewareUsingCoro(ManagerTestCase):
|
|||
self.assertIs(results[0], resp)
|
||||
self.assertFalse(download_func.called)
|
||||
|
||||
|
||||
@mark.only_asyncio()
|
||||
class MiddlewareUsingCoroAsyncio(ManagerTestCase):
|
||||
|
||||
settings_dict = {'ASYNCIO_ENABLED': True}
|
||||
|
||||
def test_asyncdef_asyncio(self):
|
||||
resp = Response('http://example.com/index.html')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue