test_project_event_details.py 889 B

1234567891011121314151617181920212223242526272829303132
  1. from django.test.client import RequestFactory
  2. from django.urls import reverse
  3. from fixtures.apidocs_test_case import APIDocsTestCase
  4. class ProjectEventDetailsDocs(APIDocsTestCase):
  5. endpoint = "sentry-api-0-project-event-details"
  6. def setUp(self):
  7. self.create_event("a")
  8. event = self.create_event("b")
  9. self.create_event("c")
  10. self.create_event("d", fingerprint=["group-2"])
  11. self.url = reverse(
  12. self.endpoint,
  13. kwargs={
  14. "organization_slug": self.project.organization.slug,
  15. "project_slug": self.project.slug,
  16. "event_id": event.event_id,
  17. },
  18. )
  19. self.login_as(user=self.user)
  20. def test_get(self):
  21. response = self.client.get(self.url)
  22. request = RequestFactory().get(self.url)
  23. self.validate_schema(request, response)