def test_not_expected_500_status(self):
     httpretty.register_uri(httpretty.GET, SERVICE_URL, status=500)
     monitor = HTTPStatusMonitor(SERVICE_URL, code='200')
     self.assertFalse(monitor.alive())
 def test_out(self):
     monitor = HTTPStatusMonitor(SERVICE_URL + "/false", status='200')
     self.assertFalse(monitor.alive())
 def test_422_status(self):
     httpretty.register_uri(httpretty.GET, SERVICE_URL, status=422)
     monitor = HTTPStatusMonitor(SERVICE_URL, code='422')
     self.assertTrue(monitor.alive())
 def test_alive(self):
     httpretty.register_uri(httpretty.GET, SERVICE_URL, status=200)
     monitor = HTTPStatusMonitor(SERVICE_URL, code='200')
     self.assertTrue(monitor.alive())
 def test_not_expected_500_status(self):
     httpretty.register_uri(httpretty.GET, SERVICE_URL, status=500)
     monitor = HTTPStatusMonitor(SERVICE_URL, code='200');
     self.assertFalse(monitor.alive())
 def test_422_status(self):
     httpretty.register_uri(httpretty.GET, SERVICE_URL, status=422)
     monitor = HTTPStatusMonitor(SERVICE_URL, code='422');
     self.assertTrue(monitor.alive())
 def test_out(self):
     monitor = HTTPStatusMonitor(SERVICE_URL+"/false", status='200');
     self.assertFalse(monitor.alive())
 def test_alive(self):
     httpretty.register_uri(httpretty.GET, SERVICE_URL, status=200)
     monitor = HTTPStatusMonitor(SERVICE_URL, code='200');
     self.assertTrue(monitor.alive())