Remove duplicated "instead" word (#38800)

* Remove duplicated "instead" word

* Actually fix the message
pull/38815/head
Victor Bocharsky 7 years ago committed by Brian Coca
parent 3c6a362921
commit a30befa609

@ -171,7 +171,7 @@ def tests_as_filters_warning(name, func):
@wraps(func) @wraps(func)
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):
display.deprecated( display.deprecated(
'Using tests as filters is deprecated. Instead of using `result|%(name)s` instead use ' 'Using tests as filters is deprecated. Instead of using `result|%(name)s` use '
'`result is %(name)s`' % dict(name=name), '`result is %(name)s`' % dict(name=name),
version='2.9' version='2.9'
) )

@ -16,14 +16,14 @@ def test_tests_as_filters_warning(mocker):
# Call successful test, ensure the message is correct # Call successful test, ensure the message is correct
filters['successful']({}) filters['successful']({})
display.deprecated.assert_called_once_with( display.deprecated.assert_called_once_with(
'Using tests as filters is deprecated. Instead of using `result|successful` instead use `result is successful`', version='2.9' 'Using tests as filters is deprecated. Instead of using `result|successful` use `result is successful`', version='2.9'
) )
# Call success test, ensure the message is correct # Call success test, ensure the message is correct
display.deprecated.reset_mock() display.deprecated.reset_mock()
filters['success']({}) filters['success']({})
display.deprecated.assert_called_once_with( display.deprecated.assert_called_once_with(
'Using tests as filters is deprecated. Instead of using `result|success` instead use `result is success`', version='2.9' 'Using tests as filters is deprecated. Instead of using `result|success` use `result is success`', version='2.9'
) )
# Call bool filter, ensure no deprecation message was displayed # Call bool filter, ensure no deprecation message was displayed

Loading…
Cancel
Save