fix deprecation message
This commit is contained in:
parent
3b68dc72e7
commit
d5633b3705
|
@ -62,7 +62,7 @@ the available arguments to aiohttp can be found
|
||||||
|
|
||||||
### Deprecated: `sanic_endpoint_test`
|
### Deprecated: `sanic_endpoint_test`
|
||||||
|
|
||||||
Prior to version 0.3.2, testing was provided through the `sanic_endpoint_test` method. This method will be deprecated in version 1.0; please use the `test_client` instead.
|
Prior to version 0.3.2, testing was provided through the `sanic_endpoint_test` method. This method will be deprecated in the next major version after 0.4.0; please use the `test_client` instead.
|
||||||
|
|
||||||
```
|
```
|
||||||
from sanic.utils import sanic_endpoint_test
|
from sanic.utils import sanic_endpoint_test
|
||||||
|
|
|
@ -7,8 +7,8 @@ def sanic_endpoint_test(app, method='get', uri='/', gather_request=True,
|
||||||
*request_args, **request_kwargs):
|
*request_args, **request_kwargs):
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"Use of sanic_endpoint_test will be deprecated in"
|
"Use of sanic_endpoint_test will be deprecated in"
|
||||||
"version 1.0. Please use the `test_client` available"
|
"the next major version after 0.4.0. Please use the `test_client` "
|
||||||
"on the app object.", DeprecationWarning)
|
"available on the app object.", DeprecationWarning)
|
||||||
|
|
||||||
test_client = TestClient(app)
|
test_client = TestClient(app)
|
||||||
return test_client._sanic_endpoint_test(
|
return test_client._sanic_endpoint_test(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user