def test_is_machine_connected_error(self):
     """Fake the NetworkManagerState."""
     self.patch(windll, "wininet", FakeWininetException())
     yield self.assertFailure(is_machine_connected(), NetworkFailException)
 def test_is_machine_connected_disconnected(self):
     """Fake the NetworkManagerState."""
     self.patch(FakeWininet, "connection_state", 0)
     result = yield is_machine_connected()
     self.assertFalse(result)