Skip to content

Commit

Permalink
Making it a simpler world
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed Sep 12, 2024
1 parent 33ec02c commit 487d49c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions tests/integrations/django/myapp/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def path(path, *args, **kwargs):
),
path("middleware-exc", views.message, name="middleware_exc"),
path("message", views.message, name="message"),
path("no-message", views.nomessage, name="nomessage"),
path("view-with-signal", views.view_with_signal, name="view_with_signal"),
path("mylogin", views.mylogin, name="mylogin"),
path("classbased", views.ClassBasedView.as_view(), name="classbased"),
Expand Down
5 changes: 5 additions & 0 deletions tests/integrations/django/myapp/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ def message(request):
return HttpResponse("ok")


@csrf_exempt
def nomessage(request):
return HttpResponse("ok")


@csrf_exempt
def view_with_signal(request):
custom_signal = Signal()
Expand Down
12 changes: 6 additions & 6 deletions tests/integrations/django/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1170,9 +1170,9 @@ def test_transaction_http_method_default(sentry_init, client, capture_events):
)
events = capture_events()

client.get(reverse("not_cached_view"))
client.options(reverse("not_cached_view"))
client.head(reverse("not_cached_view"))
client.get(reverse("nomessage"))
client.options(reverse("nomessage"))
client.head(reverse("nomessage"))

(event,) = events

Expand All @@ -1191,9 +1191,9 @@ def test_transaction_http_method_custom(sentry_init, client, capture_events):
)
events = capture_events()

client.get(reverse("not_cached_view"))
client.options(reverse("not_cached_view"))
client.head(reverse("not_cached_view"))
client.get(reverse("nomessage"))
client.options(reverse("nomessage"))
client.head(reverse("nomessage"))

assert len(events) == 2

Expand Down

0 comments on commit 487d49c

Please sign in to comment.