mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-18 14:28:08 +00:00
Use the ProactorEventLoop on Windows.
This commit is contained in:
parent
d3ea67da24
commit
1d4c3a164d
@ -21,6 +21,12 @@ from .handlers.api.base import Query
|
||||
sys._called_from_test = True
|
||||
sys.original_platform = sys.platform
|
||||
|
||||
if sys.platform.startswith("win"):
|
||||
import asyncio
|
||||
# use the Proactor event loop on Windows
|
||||
loop = asyncio.ProactorEventLoop()
|
||||
asyncio.set_event_loop(loop)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
async def http_client(aiohttp_client):
|
||||
|
@ -70,7 +70,7 @@ async def test_web_ui(http_client, tmpdir):
|
||||
f.write('world')
|
||||
response = await http_client.get('/static/web-ui/testing.txt')
|
||||
assert response.status == 200
|
||||
os.remove(get_static('web-ui/testing.txt'))
|
||||
os.remove(tmpfile)
|
||||
|
||||
|
||||
async def test_web_ui_not_found(http_client, tmpdir):
|
||||
|
Loading…
Reference in New Issue
Block a user