def testResetPreferredNetworksReversesNetworks(self):
    interface = 'en0'
    networks = ['NetworkOne$OPEN', 'NetworkTwo$WPA2']
    self.mox.StubOutWithMock(wifi_network_order.os, 'geteuid')
    self.mox.StubOutWithMock(wifi_network_order, 'RemovePreferredNetwork')
    self.mox.StubOutWithMock(wifi_network_order, 'AddPreferredNetwork')
    wifi_network_order.os.geteuid().AndReturn(0)
    wifi_network_order.RemovePreferredNetwork(interface, 'NetworkTwo',
                                              sudo_password=None)
    wifi_network_order.AddPreferredNetwork(interface, 'NetworkTwo', 'WPA2',
                                           index=0, sudo_password=None)
    wifi_network_order.RemovePreferredNetwork(interface, 'NetworkOne',
                                              sudo_password=None)
    wifi_network_order.AddPreferredNetwork(interface, 'NetworkOne', 'OPEN',
                                           index=0, sudo_password=None)
    self.mox.ReplayAll()
    wifi_network_order.ResetPreferredNetworks(interface, networks)
    self.mox.VerifyAll()
Test ResetPreferredNetworks reverses the network list.
dataset/ETHPy150Open google/macops/gmacpyutil/gmacpyutil/wifi_network_order_test.py/WifiNetworkOrderModuleTest.testResetPreferredNetworksReversesNetworks