mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Download custom appliance symbols from GitHub
Fix symbol cache issue. Ref https://github.com/GNS3/gns3-gui/issues/2671 Fix temporary directory for symbols was not deleted Fix temporary appliance file was not deleted
This commit is contained in:
1 parent
889d29ec55
commit
bae3fb84b9
8 files changed
+95
-37
No files matched your search
@@ -259,16 +259,15 @@ def test_symbol(node, symbols_dir, controller):
|
||||
Change symbol should change the node size
|
||||
"""
|
||||
|
||||
controller.symbols.theme = "Classic"
|
||||
node.symbol = ":/symbols/dslam.svg"
|
||||
assert node.symbol == ":/symbols/dslam.svg"
|
||||
node.symbol = ":/symbols/classic/dslam.svg"
|
||||
assert node.symbol == ":/symbols/classic/dslam.svg"
|
||||
assert node.width == 50
|
||||
assert node.height == 53
|
||||
assert node.label["x"] is None
|
||||
assert node.label["y"] == -40
|
||||
|
||||
node.symbol = ":/symbols/cloud.svg"
|
||||
assert node.symbol == ":/symbols/cloud.svg"
|
||||
node.symbol = ":/symbols/classic/cloud.svg"
|
||||
assert node.symbol == ":/symbols/classic/cloud.svg"
|
||||
assert node.width == 159
|
||||
assert node.height == 71
|
||||
assert node.label["x"] is None
|
||||
|
||||
@@ -31,13 +31,15 @@ def test_list(symbols_dir):
|
||||
symbols = Symbols()
|
||||
assert {
|
||||
'symbol_id': ':/symbols/classic/firewall.svg',
|
||||
'filename': 'classic/firewall.svg',
|
||||
'builtin': True
|
||||
'filename': 'firewall.svg',
|
||||
'builtin': True,
|
||||
'theme': 'Classic'
|
||||
} in symbols.list()
|
||||
assert {
|
||||
'symbol_id': 'linux.svg',
|
||||
'filename': 'linux.svg',
|
||||
'builtin': False
|
||||
'builtin': False,
|
||||
'theme': 'Custom symbols'
|
||||
} in symbols.list()
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user