unit tests: use f-strings (#10993)

This commit is contained in:
Alexei Znamensky
2025-10-27 12:32:33 +13:00
committed by GitHub
parent e177d1e61a
commit efad7a0d38
25 changed files with 54 additions and 78 deletions

View File

@@ -94,7 +94,7 @@ def test_populate(inventory, mocker):
# module settings
inventory.icinga2_user = 'ansible'
inventory.icinga2_password = 'password'
inventory.icinga2_url = 'https://localhost:5665' + '/v1'
inventory.icinga2_url = "https://localhost:5665/v1"
inventory.inventory_attr = "address"
inventory.group_by_hostgroups = True

View File

@@ -97,7 +97,7 @@ def test_build_inventory_groups_with_no_groupselection(inventory):
group_comparative_data = {'all': [], 'ungrouped': []}
eq = True
print("data: {0}".format(generated_data))
print(f"data: {generated_data}")
for key, value in group_comparative_data.items():
if generated_data[key] != value:
eq = False