We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 526c48a commit 99d49b0Copy full SHA for 99d49b0
tests/request_id_tests.py
@@ -12,6 +12,14 @@ def setUp(self):
12
self.app.route('/')(lambda: 'hello world')
13
self.app.testing = True
14
15
+ def test_lazy_initialization(self):
16
+ # Bug #38: https://github.com/Workable/flask-log-request-id/issues/38
17
+ request_id = RequestID()
18
+ request_id.init_app(self.app)
19
+ with self.app.test_request_context(headers={'X-Amzn-Trace-Id': 'Self=1-67891234-def;Root=1-67891233-abc'}):
20
+ self.app.preprocess_request()
21
+ self.assertEqual('1-67891234-def', current_request_id())
22
+
23
def test_default_request_id_parser_with_amazon(self):
24
RequestID(self.app)
25
with self.app.test_request_context(headers={'X-Amzn-Trace-Id': 'Self=1-67891234-def;Root=1-67891233-abc'}):
0 commit comments