mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-19 15:53:47 +00:00
Config option to disable built-in templates
This commit is contained in:
@ -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