11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
-
15
14
import flask
16
- from werkzeug .test import Client
17
- from werkzeug .wrappers import Response
18
-
19
15
from opentelemetry .instrumentation .flask import FlaskInstrumentor
20
16
from opentelemetry .test .wsgitestutil import WsgiTestBase
17
+ from werkzeug .test import Client
18
+ from werkzeug .wrappers import Response
21
19
22
- # pylint: disable=import-error
23
20
from .base_test import InstrumentationTest
24
21
25
22
@@ -41,12 +38,10 @@ def test_copycontext(self):
41
38
copied via `flask.copy_current_request_context`
42
39
"""
43
40
self .app = flask .Flask (__name__ )
44
- self .app .route ("/copy_context" )(
45
- self ._copy_context_endpoint
46
- )
41
+ self .app .route ("/copy_context" )(self ._copy_context_endpoint )
47
42
client = Client (self .app , Response )
48
- resp = client .get ("/copy_context" , headers = {' x-req' : ' a-header' })
43
+ resp = client .get ("/copy_context" , headers = {" x-req" : " a-header" })
49
44
50
45
self .assertEqual (200 , resp .status_code )
51
- self .assertEqual (' /copy_context' , resp .json [' span_name' ])
52
- self .assertEqual (' a-header' , resp .json [' request_header' ])
46
+ self .assertEqual (" /copy_context" , resp .json [" span_name" ])
47
+ self .assertEqual (" a-header" , resp .json [" request_header" ])
0 commit comments