-
-
Notifications
You must be signed in to change notification settings - Fork 328
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
Replies: 1 comment 2 replies
-
Are there any security implications to using test_mode?
Beta Was this translation helpful? Give feedback.
All reactions
-
This is purely related to IDOM's test tooling. I was planning on setting this when creating a development app instance for Sanic.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
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.
Beta Was this translation helpful? Give feedback.