mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 14:31:13 +02:00
refactor: use f-strings in compute tests
This commit is contained in:
8 files changed
+70
-76
No files matched your search
@@ -74,5 +74,5 @@ async def test_get_mac_id_no_id_available(compute_project, port_manager):
|
||||
with pytest.raises(VPCSError):
|
||||
for i in range(0, 256):
|
||||
node_id = str(uuid.uuid4())
|
||||
await vpcs.create_node("PC {}".format(i), compute_project.id, node_id)
|
||||
await vpcs.create_node(f"PC {i}", compute_project.id, node_id)
|
||||
assert vpcs.get_mac_id(node_id) == i
|
||||
@@ -298,7 +298,7 @@ def test_update_startup_script_with_escaping_characters_in_name(vm):
|
||||
|
||||
vm.startup_script = "set pcname initial-name\n"
|
||||
vm.name = "test\\"
|
||||
assert vm.startup_script == "set pcname test{}".format(os.linesep)
|
||||
assert vm.startup_script == f"set pcname test{os.linesep}"
|
||||
|
||||
|
||||
def test_get_startup_script(vm):
|
||||
|
||||
Reference in new issue
Block a user