mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 03:08:14 +00:00
Fix tests. Fixes #1796
This commit is contained in:
parent
380e7a8a7f
commit
855a95de49
@ -39,7 +39,7 @@ async def manager(loop, port_manager):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="function")
|
@pytest.fixture(scope="function")
|
||||||
async def vm(loop, compute_project, manager, ubridge_path):
|
async def vm(loop, compute_project, manager, tmpdir, ubridge_path):
|
||||||
|
|
||||||
vm = VPCSVM("test", "00010203-0405-0607-0809-0a0b0c0d0e0f", compute_project, manager)
|
vm = VPCSVM("test", "00010203-0405-0607-0809-0a0b0c0d0e0f", compute_project, manager)
|
||||||
vm._vpcs_version = parse_version("0.9")
|
vm._vpcs_version = parse_version("0.9")
|
||||||
|
@ -53,7 +53,7 @@ def write_config(tmpdir, settings):
|
|||||||
return path
|
return path
|
||||||
|
|
||||||
|
|
||||||
def test_get_section_config(tmpdir):
|
def test_get_section_config(loop, tmpdir):
|
||||||
|
|
||||||
config = load_config(tmpdir, {
|
config = load_config(tmpdir, {
|
||||||
"Server": {
|
"Server": {
|
||||||
@ -63,7 +63,7 @@ def test_get_section_config(tmpdir):
|
|||||||
assert dict(config.get_section_config("Server")) == {"host": "127.0.0.1"}
|
assert dict(config.get_section_config("Server")) == {"host": "127.0.0.1"}
|
||||||
|
|
||||||
|
|
||||||
def test_set_section_config(tmpdir):
|
def test_set_section_config(loop, tmpdir):
|
||||||
|
|
||||||
config = load_config(tmpdir, {
|
config = load_config(tmpdir, {
|
||||||
"Server": {
|
"Server": {
|
||||||
@ -77,7 +77,7 @@ def test_set_section_config(tmpdir):
|
|||||||
assert dict(config.get_section_config("Server")) == {"host": "192.168.1.1", "local": "true"}
|
assert dict(config.get_section_config("Server")) == {"host": "192.168.1.1", "local": "true"}
|
||||||
|
|
||||||
|
|
||||||
def test_set(tmpdir):
|
def test_set(loop, tmpdir):
|
||||||
|
|
||||||
config = load_config(tmpdir, {
|
config = load_config(tmpdir, {
|
||||||
"Server": {
|
"Server": {
|
||||||
@ -90,7 +90,7 @@ def test_set(tmpdir):
|
|||||||
assert dict(config.get_section_config("Server")) == {"host": "192.168.1.1"}
|
assert dict(config.get_section_config("Server")) == {"host": "192.168.1.1"}
|
||||||
|
|
||||||
|
|
||||||
def test_reload(tmpdir):
|
def test_reload(loop, tmpdir):
|
||||||
|
|
||||||
config = load_config(tmpdir, {
|
config = load_config(tmpdir, {
|
||||||
"Server": {
|
"Server": {
|
||||||
|
Loading…
Reference in New Issue
Block a user