test_project_event_details.py 971 B

12345678910111213141516171819202122232425262728293031323334
  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(stable=True)
  6. class ProjectEventDetailsDocs(APIDocsTestCase):
  7. endpoint = "sentry-api-0-project-event-details"
  8. def setUp(self):
  9. self.create_event("a")
  10. event = self.create_event("b")
  11. self.create_event("c")
  12. self.create_event("d", fingerprint=["group-2"])
  13. self.url = reverse(
  14. self.endpoint,
  15. kwargs={
  16. "organization_slug": self.project.organization.slug,
  17. "project_slug": self.project.slug,
  18. "event_id": event.event_id,
  19. },
  20. )
  21. self.login_as(user=self.user)
  22. def test_get(self):
  23. response = self.client.get(self.url)
  24. request = RequestFactory().get(self.url)
  25. self.validate_schema(request, response)