Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BackendFixture fails with Sanic because missing test_mode #860

Unanswered
ahopkins asked this question in Problem
Discussion options

The problem was reported here: sanic-org/sanic#2643.

The issue is that the BackendFixture for testing Sanic does not set Sanic.test_mode = True, which means that there is potential for issues (as seen the linked issue) to arise. I propose that you add this into your test implementation for Sanic to automatically manage setting that variable.

You must be logged in to vote

Replies: 1 comment 2 replies

Comment options

Are there any security implications to using test_mode?

You must be logged in to vote
2 replies
Comment options

This is purely related to IDOM's test tooling. I was planning on setting this when creating a development app instance for Sanic.

Comment options

No security concerns. When Sanic starts up, one of the things that it does is some self-inspection of the application and actually rewrites some class methods to optimize for the task at hand. One of the things test_mode does (and was the issue in the link above) is make this process more lenient and fault tolerant. Something you will need when you are constantly standing up the same application in the same interpreter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /