From 487d49c3e8edfa094dff3a7e75a2806da0c72de8 Mon Sep 17 00:00:00 2001 From: Anton Pirker Date: Thu, 12 Sep 2024 17:28:33 +0200 Subject: [PATCH] Making it a simpler world --- tests/integrations/django/myapp/urls.py | 1 + tests/integrations/django/myapp/views.py | 5 +++++ tests/integrations/django/test_basic.py | 12 ++++++------ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/integrations/django/myapp/urls.py b/tests/integrations/django/myapp/urls.py index b9e821afa8..afe7d37082 100644 --- a/tests/integrations/django/myapp/urls.py +++ b/tests/integrations/django/myapp/urls.py @@ -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"), diff --git a/tests/integrations/django/myapp/views.py b/tests/integrations/django/myapp/views.py index c1950059fe..5e8cc39053 100644 --- a/tests/integrations/django/myapp/views.py +++ b/tests/integrations/django/myapp/views.py @@ -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() diff --git a/tests/integrations/django/test_basic.py b/tests/integrations/django/test_basic.py index a14a56b09d..6d38d270ec 100644 --- a/tests/integrations/django/test_basic.py +++ b/tests/integrations/django/test_basic.py @@ -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 @@ -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