5
5
from requests import Request
6
6
7
7
from log_request_id import DEFAULT_NO_REQUEST_ID , local
8
+ from log_request_id .session import Session
8
9
from log_request_id .middleware import RequestIDMiddleware
9
10
from testproject .views import test_view
10
11
@@ -101,7 +102,6 @@ def setUp(self):
101
102
102
103
def test_request_id_passthrough_with_custom_header (self ):
103
104
with self .settings (LOG_REQUEST_ID_HEADER = 'REQUEST_ID_HEADER' , OUTGOING_REQUEST_ID_HEADER = 'OUTGOING_REQUEST_ID_HEADER' ):
104
- from log_request_id .session import Session
105
105
request = self .factory .get ('/' )
106
106
request .META ['REQUEST_ID_HEADER' ] = 'some_request_id'
107
107
middleware = RequestIDMiddleware ()
@@ -117,7 +117,6 @@ def test_request_id_passthrough_with_custom_header(self):
117
117
118
118
def test_request_id_passthrough (self ):
119
119
with self .settings (LOG_REQUEST_ID_HEADER = 'REQUEST_ID_HEADER' ):
120
- from log_request_id .session import Session
121
120
request = self .factory .get ('/' )
122
121
request .META ['REQUEST_ID_HEADER' ] = 'some_request_id'
123
122
middleware = RequestIDMiddleware ()
@@ -133,6 +132,5 @@ def test_request_id_passthrough(self):
133
132
134
133
def test_misconfigured_for_sessions (self ):
135
134
def inner ():
136
- from log_request_id .session import Session # noqa
137
135
Session ()
138
136
self .assertRaises (ImproperlyConfigured , inner )
0 commit comments