Sanic 21.12 will require changes in tests, and possibly in code.
Sanic 21.3 moved testing support from sanic.testing to a new module sanic-testing. This will require a different requirements file than Sanic 20.x to install sanic-testing.
There are other changes needed to support sanic-testing, such as changes to app registration and the test client. The changes are large enough that a new test file may be useful, rather than dynamically changing code based on the version.
There may be other changes in the framework itself. For example, this test:
|
dockerflow = Dockerflow() |
|
assert "dockerflow.heartbeat" not in app.router.routes_names |
fails with AttributeError: 'Router' object has no attribute 'routes_names'.
Currently, tests pass for Sanic 20.12.3, which is supported until December 2022. After this date, if we don't support Sanic 21.12, then we may want to drop Sanic support entirely.
Sanic 21.12 will require changes in tests, and possibly in code.
Sanic 21.3 moved testing support from
sanic.testingto a new modulesanic-testing. This will require a different requirements file than Sanic 20.x to installsanic-testing.There are other changes needed to support
sanic-testing, such as changes to app registration and the test client. The changes are large enough that a new test file may be useful, rather than dynamically changing code based on the version.There may be other changes in the framework itself. For example, this test:
python-dockerflow/tests/sanic/test_sanic.py
Lines 98 to 99 in 5e30d69
fails with
AttributeError: 'Router' object has no attribute 'routes_names'.Currently, tests pass for Sanic 20.12.3, which is supported until December 2022. After this date, if we don't support Sanic 21.12, then we may want to drop Sanic support entirely.