Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions providers/base/bin/wifi_nmcli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ def turn_down_nm_connections():
print_head("Turn off NM all connections")
connections = _get_nm_wireless_connections()
for name, value in connections.items():
if value["state"] != "activated":
continue
uuid = value["uuid"]
print("Turn down connection", name)
cmd = "nmcli c down {}".format(uuid)
Expand Down
5 changes: 4 additions & 1 deletion providers/base/tests/test_wifi_nmcli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ def test_no_connections_to_turn_down(
@patch("wifi_nmcli_test.sp.check_call")
@patch(
"wifi_nmcli_test._get_nm_wireless_connections",
return_value={"Wireless1": {"uuid": "uuid1", "state": "activated"}},
return_value={
"Wireless1": {"uuid": "uuid1", "state": "activated"},
"Wireless2": {"uuid": "uuid2", "state": "deactivated"},
},
)
def test_turn_down_single_connection(
self, get_connections_mock, sp_check_call_mock
Expand Down
Loading