mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Cleanup unused and duplicates
This commit is contained in:
1 parent
58d2a5d4b0
commit
1248584841
12 files changed
+9
-53
No files matched your search
@@ -49,16 +49,6 @@ def base_params(tmpdir, fake_qemu_bin):
|
||||
return {"name": "PC TEST 1", "qemu_path": fake_qemu_bin}
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def fake_qemu_bin():
|
||||
|
||||
bin_path = os.path.join(os.environ["PATH"], "qemu-system-x86_64")
|
||||
with open(bin_path, "w+") as f:
|
||||
f.write("1")
|
||||
os.chmod(bin_path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
|
||||
return bin_path
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def vm(server, project, base_params):
|
||||
response = server.post("/projects/{project_id}/qemu/vms".format(project_id=project.id), base_params)
|
||||
|
||||
@@ -90,25 +90,6 @@ def test_set(tmpdir):
|
||||
assert dict(config.get_section_config("Server")) == {"host": "192.168.1.1"}
|
||||
|
||||
|
||||
def test_reload(tmpdir):
|
||||
|
||||
config = load_config(tmpdir, {
|
||||
"Server": {
|
||||
"host": "127.0.0.1"
|
||||
}
|
||||
})
|
||||
assert dict(config.get_section_config("Server")) == {"host": "127.0.0.1"}
|
||||
|
||||
path = write_config(tmpdir, {
|
||||
"Server": {
|
||||
"host": "192.168.1.1"
|
||||
}
|
||||
})
|
||||
|
||||
config.reload()
|
||||
assert dict(config.get_section_config("Server")) == {"host": "192.168.1.1"}
|
||||
|
||||
|
||||
def test_reload(tmpdir):
|
||||
|
||||
config = load_config(tmpdir, {
|
||||
|
||||
Reference in new issue
Block a user