test_event_id_lookup.py 650 B

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