mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Config option to disable built-in templates
This commit is contained in:
1 parent
2eb64200a4
commit
67bf14776f
3 files changed
+22
-7
No files matched your search
@@ -24,6 +24,7 @@ import aiohttp
|
||||
from unittest.mock import MagicMock, patch
|
||||
from tests.utils import AsyncioMagicMock, asyncio_patch
|
||||
|
||||
from gns3server.config import Config
|
||||
from gns3server.controller.compute import Compute
|
||||
from gns3server.version import __version__
|
||||
|
||||
@@ -451,6 +452,15 @@ def test_load_templates(controller):
|
||||
assert cloud_uuid == template.id
|
||||
|
||||
|
||||
def test_load_templates_without_builtins(controller):
|
||||
|
||||
config = Config.instance()
|
||||
config.set("Server", "enable_builtin_templates", False)
|
||||
controller.template_manager.load_templates()
|
||||
|
||||
assert not controller.template_manager.templates.values()
|
||||
|
||||
|
||||
async def test_autoidlepc(controller):
|
||||
|
||||
controller._computes["local"] = AsyncioMagicMock()
|
||||
|
||||
Reference in new issue
Block a user