Remove duplicated "instead" word (#38800)

* Remove duplicated "instead" word

* Actually fix the message
This commit is contained in:
Victor Bocharsky 2018-04-16 16:23:43 +03:00 committed by Brian Coca
parent 3c6a362921
commit a30befa609
2 changed files with 3 additions and 3 deletions

View file

@ -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'
) )

View file

@ -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