Skip test_list_all_networks if no known network configured

If test_list_all_networks is run in an env without networks configured
then it will fail as it tries to assert that the list of networks are
not empty but actually it is empty.

So this PR skip the test if no known network is configured.

Note that the test API here is deprecated since Newton. So I did the
minimal effort to stabilize this test.

Change-Id: I5e0bc22da5281dec0e4679fcc3891f9c2e7cb770
1 file changed