def test_wait_repeats_ok(self):
     proxy = ProxyMock(is_raising=True)
     self.assertFalse(wait(proxy, repeat_timout_sec=0))
     self.assertEqual(proxy.classes_called, 10)
 def test_wait_reraises(self):
     proxy = ProxyMock(is_raising=True, errno=666)
     self.assertRaises(socket.error, lambda: wait(proxy))
 def test_wait_check_online_once(self):
     proxy = ProxyMock()
     self.assertTrue(wait(proxy))
     self.assertEqual(proxy.classes_called, 1)