support/testing: TestPythonPy3NetworkmanagerGoi: check we actually get data

The sample script would've passed even if the connections list was
empty. Check that there is at least one connection, and that the
sample script can read loopback device information.

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
This commit is contained in:
Fiona Klute
2026-06-27 13:34:09 +02:00
committed by Romain Naour
parent ad9d4c8351
commit f38f5bb593

View File

@@ -24,3 +24,11 @@ for c in connections:
print("{}:".format(c.get_id()))
c.for_each_setting_value(print_values, None)
print("\n")
print("found {} defined connections".format(len(connections)))
assert len(connections) > 0
# check that we can find the loopback device ...
loopback = client.get_device_by_iface("lo")
# ... and read its type and status as expected
assert loopback.get_device_type().name == "LOOPBACK"
assert loopback.get_state().name == "ACTIVATED"