def test_literal(traverser, value): """ Test the value of a literal, in particular only a string literal at the moment, against possibly dangerous patterns. """ if isinstance(value, basestring): validate_string(value, traverser)
def test_literal(traverser, wrapper): """ Test the value of a literal, in particular only a string literal at the moment, against possibly dangerous patterns. """ value = wrapper.get_literal_value() if isinstance(value, basestring): # Local import to prevent import loop. from validator.testcases.regex import validate_string validate_string(value, traverser, wrapper=wrapper)