def test_should_open_if_exceeds_threshold(self): breaker = Breaker(service='test', threshold=5) self.assertTrue(breaker.should_open(6))
def test_should_open_if_not_exceeds_threshold(self): breaker = Breaker(service='test', threshold=5) self.assertFalse(breaker.should_open(4))