Config option to disable built-in templates

This commit is contained in:
grossmj committed 2022-06-15 14:48:52 +02:00
1 parent 2eb64200a4
commit 67bf14776f
3 files changed
+22 -7

No files matched your search

+10
View File
@@ -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()