1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-05-03 17:03:06 +00:00

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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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