test_event_id_lookup.py 719 B

1234567891011121314151617181920212223
  1. from django.test.client import RequestFactory
  2. from django.urls import reverse
  3. from fixtures.apidocs_test_case import APIDocsTestCase
  4. from sentry.testutils.silo import region_silo_test
  5. @region_silo_test
  6. class OrganizationEventIDLookupDocs(APIDocsTestCase):
  7. def setUp(self):
  8. event = self.create_event("a", message="oh no")
  9. self.url = reverse(
  10. "sentry-api-0-event-id-lookup",
  11. kwargs={"organization_slug": self.organization.slug, "event_id": event.event_id},
  12. )
  13. self.login_as(user=self.user)
  14. def test_get(self):
  15. response = self.client.get(self.url)
  16. request = RequestFactory().get(self.url)
  17. self.validate_schema(request, response)