../sanic/signals.py find_route() 'NoneType' object is not callable

During Sanic upgrade from v1.9.9 to v2.6.1 async tests were failing.
Ive made many adjustments to match the versions sanic-related packages with this version.
The tests uses SanicTestClient.

the initialization of the client is as follows:

@pytest.fixture
def test_cli(loop, app, sanic_client) -> SanicTestClient:
    cli = loop.run_until_complete(sanic_client(app))
    cli.server.after_server_stop = []
    return cli

routes are being set as the following example (sanic-restful-api)
api.add_resource(…)

call to the API is as follows (SanicTestClient):
await test_cli.put(..

Following are test-related and sanic-related versions in use:

sanic==22.6.1
sanic-cors==2.1.0
sanic-restful-api==0.1.5
pytest==6.2.0
pytest-sanic==1.9.1
pytest==6.2.0
pytest-mock==3.6.1
pytest-postgresql==4.1.1
pytest-timeout==2.1.0
httpx==0.18.1
sanic-restful==0.1.1
sanic-routing==22.3.0
sanic-testing==22.6.0

Ill be glad for any assistance

Hi, do you mean upgrading from sanic 19.9 to 22.6.1?

Since there is no 1.9.9 and no 2.6.1, and reviewing your dependencies that’s what I am assuming.

If so, there are a great many changes that were made in those 3 years.

What’s the question here?

Im having this issue with signals → find_route func is None, when running a test REST call using pytest-sanic 19, sanic-testing
Sanic version is 22.6.1
If Im trying to run with simply app.asgin_client.get(…) find_route is not None but im failing on
sanic.exceptions.SanicException: Loop can only be retrieved after the app has started running. Not supported with create_server function

I would like some advice and a path for a solution since the tests failures are blocking me from upgrading sanic to a non vulnerable version

Sounds like however it is being invoked is not calling app.signalize() before starting. You said you are using sanic-testing? You should upgrade that alongside sanic.