Skip to content

Commit 4cc8b8d

Browse files
committed
formatting
1 parent 1eb0a57 commit 4cc8b8d

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

tests/integrations/django/test_basic.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ def test_ensures_x_forwarded_header_is_honored_in_sdk_when_enabled_in_django(
7272
sentry_init(integrations=[DjangoIntegration()], send_default_pii=True)
7373
exceptions = capture_exceptions()
7474
events = capture_events()
75-
unpack_werkzeug_response(client.get(reverse("view_exc"), headers={"X_FORWARDED_HOST": "example.com"}))
75+
unpack_werkzeug_response(
76+
client.get(reverse("view_exc"), headers={"X_FORWARDED_HOST": "example.com"})
77+
)
7678

7779
(error,) = exceptions
7880
assert isinstance(error, ZeroDivisionError)
@@ -91,7 +93,9 @@ def test_ensures_x_forwarded_header_is_not_honored_when_unenabled_in_django(
9193
sentry_init(integrations=[DjangoIntegration()], send_default_pii=True)
9294
exceptions = capture_exceptions()
9395
events = capture_events()
94-
unpack_werkzeug_response(client.get(reverse("view_exc"), headers={"X_FORWARDED_HOST": "example.com"}))
96+
unpack_werkzeug_response(
97+
client.get(reverse("view_exc"), headers={"X_FORWARDED_HOST": "example.com"})
98+
)
9599

96100
(error,) = exceptions
97101
assert isinstance(error, ZeroDivisionError)

tests/integrations/strawberry/test_strawberry.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ def test_capture_request_if_available_and_send_pii_is_on(
199199

200200
query = "query ErrorQuery { error }"
201201
# Close the response to ensure the WSGI cycle is complete and the transaction is finished
202-
client.post("/graphql", json={"query": query, "operationName": "ErrorQuery"}).close()
202+
client.post(
203+
"/graphql", json={"query": query, "operationName": "ErrorQuery"}
204+
).close()
203205

204206
assert len(events) == 1
205207

@@ -255,7 +257,9 @@ def test_do_not_capture_request_if_send_pii_is_off(
255257

256258
query = "query ErrorQuery { error }"
257259
# Close the response to ensure the WSGI cycle is complete and the transaction is finished
258-
client.post("/graphql", json={"query": query, "operationName": "ErrorQuery"}).close()
260+
client.post(
261+
"/graphql", json={"query": query, "operationName": "ErrorQuery"}
262+
).close()
259263

260264
assert len(events) == 1
261265

@@ -336,7 +340,9 @@ def test_capture_transaction_on_error(
336340

337341
query = "query ErrorQuery { error }"
338342
# Close the response to ensure the WSGI cycle is complete and the transaction is finished
339-
client.post("/graphql", json={"query": query, "operationName": "ErrorQuery"}).close()
343+
client.post(
344+
"/graphql", json={"query": query, "operationName": "ErrorQuery"}
345+
).close()
340346

341347
assert len(events) == 2
342348
(_, transaction_event) = events
@@ -414,7 +420,9 @@ def test_capture_transaction_on_success(
414420

415421
query = "query GreetingQuery { hello }"
416422
# Close the response to ensure the WSGI cycle is complete and the transaction is finished
417-
client.post("/graphql", json={"query": query, "operationName": "GreetingQuery"}).close()
423+
client.post(
424+
"/graphql", json={"query": query, "operationName": "GreetingQuery"}
425+
).close()
418426

419427
assert len(events) == 1
420428
(transaction_event,) = events
@@ -725,7 +733,9 @@ def test_span_origin2(
725733

726734
query = "query GreetingQuery { hello }"
727735
# Close the response to ensure the WSGI cycle is complete and the transaction is finished
728-
client.post("/graphql", json={"query": query, "operationName": "GreetingQuery"}).close()
736+
client.post(
737+
"/graphql", json={"query": query, "operationName": "GreetingQuery"}
738+
).close()
729739

730740
(event,) = events
731741

0 commit comments

Comments
 (0)