Raise error if using a non linked clone VM twice

Fix https://github.com/GNS3/gns3-gui/issues/1593
This commit is contained in:
Julien Duponchelle committed 2016-10-24 21:39:35 +02:00
1 parent 597e1e618d
commit ae1e027031
20 files changed
+100 -54

No files matched your search

+4 -4
View File
@@ -82,9 +82,6 @@ def http_server(request, loop, port_manager, monkeypatch, controller):
app = web.Application()
for method, route, handler in Route.get_routes():
app.router.add_route(method, route, handler)
for module in MODULES:
instance = module.instance()
instance.port_manager = port_manager
host = "localhost"
@@ -145,7 +142,7 @@ def project(tmpdir):
return p
@pytest.fixture(scope="session")
@pytest.fixture(scope="function")
def port_manager():
"""An instance of port manager"""
@@ -198,6 +195,9 @@ def run_around_tests(monkeypatch, port_manager, controller, config):
tmppath = tempfile.mkdtemp()
for module in MODULES:
module._instance = None
port_manager._instance = port_manager
os.makedirs(os.path.join(tmppath, 'projects'))
config.set("Server", "projects_path", os.path.join(tmppath, 'projects'))