def test_catch_all_gevented_requests(vts_rec_on, movie_server):
"""Keep this test at the very end to avoid messing up with the rest of the
tests, since it's monkey patching the network related operations.
Maybe write a custom pytest order enforcer later."""
def _job():
return http_get(movie_server.url)
from gevent.pool import Pool
import gevent.monkey
gevent.monkey.patch_socket(dns=True)
pool = Pool()
for x in range(10):
pool.spawn(_job)
pool.join()
assert len(vts_rec_on.cassette) == 10
评论列表
文章目录