mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Migration to FastAPI
This commit is contained in:
1 parent
c12b675691
commit
eb3cb8a41f
224 files changed
+11254
-13517
No files matched your search
@@ -25,6 +25,7 @@ from gns3server.utils.asyncio import wait_run_in_executor, subprocess_check_outp
|
||||
from tests.utils import AsyncioMagicMock
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_wait_run_in_executor():
|
||||
|
||||
def change_var(param):
|
||||
@@ -34,6 +35,7 @@ async def test_wait_run_in_executor():
|
||||
assert result == "test"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_exception_wait_run_in_executor():
|
||||
|
||||
def raise_exception():
|
||||
@@ -44,13 +46,15 @@ async def test_exception_wait_run_in_executor():
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows")
|
||||
async def test_subprocess_check_output(loop, tmpdir):
|
||||
@pytest.mark.asyncio
|
||||
async def test_subprocess_check_output(tmpdir):
|
||||
|
||||
path = str(tmpdir / "test")
|
||||
result = await subprocess_check_output("echo", "-n", path)
|
||||
assert result == path
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_lock_decorator():
|
||||
"""
|
||||
The test check if the the second call to method_to_lock wait for the
|
||||
|
||||
@@ -24,6 +24,7 @@ from gns3server.utils.file_watcher import FileWatcher
|
||||
|
||||
|
||||
@pytest.mark.parametrize("strategy", ['mtime', 'hash'])
|
||||
@pytest.mark.asyncio
|
||||
async def test_file_watcher(tmpdir, strategy):
|
||||
|
||||
file = tmpdir / "test"
|
||||
@@ -38,6 +39,7 @@ async def test_file_watcher(tmpdir, strategy):
|
||||
|
||||
|
||||
@pytest.mark.parametrize("strategy", ['mtime', 'hash'])
|
||||
@pytest.mark.asyncio
|
||||
async def test_file_watcher_not_existing(tmpdir, strategy):
|
||||
|
||||
file = tmpdir / "test"
|
||||
@@ -51,6 +53,7 @@ async def test_file_watcher_not_existing(tmpdir, strategy):
|
||||
|
||||
|
||||
@pytest.mark.parametrize("strategy", ['mtime', 'hash'])
|
||||
@pytest.mark.asyncio
|
||||
async def test_file_watcher_list(tmpdir, strategy):
|
||||
|
||||
file = tmpdir / "test"
|
||||
|
||||
Reference in new issue
Block a user