def test_non_decorator_empty_string(self): with raises(AssertionError) as exc: decorators.not_empty("") exc_msg = str(exc.value) assert 'is empty' in exc_msg
def test_not_of_any_valid_types(self): with raises(AssertionError) as exc: decorators.not_empty(False) errors = exc.value.args[0] assert 'not of any valid types' in errors