def test_remove_excluded_exception(): """It should allow the user to remove an excluded exception.""" breaker = CircuitBreaker() breaker.add_excluded_exception(NotImplementedError) assert (NotImplementedError, ) == breaker.excluded_exceptions breaker.remove_excluded_exception(NotImplementedError) assert () == breaker.excluded_exceptions
def test_add_excluded_exception(): """ it should allow the user to exclude an exception at a later time.""" breaker = CircuitBreaker() assert () == breaker.excluded_exceptions breaker.add_excluded_exception(NotImplementedError) assert (NotImplementedError, ) == breaker.excluded_exceptions breaker.add_excluded_exception(Exception) assert (NotImplementedError, Exception) == breaker.excluded_exceptions