test_project_events.py 728 B

12345678910111213141516171819202122232425262728
  1. from django.test.client import RequestFactory
  2. from django.urls import reverse
  3. from fixtures.apidocs_test_case import APIDocsTestCase
  4. class ProjectEventsDocs(APIDocsTestCase):
  5. endpoint = "sentry-api-0-project-events"
  6. def setUp(self):
  7. self.create_event("a")
  8. self.create_event("b")
  9. self.url = reverse(
  10. self.endpoint,
  11. kwargs={
  12. "organization_slug": self.organization.slug,
  13. "project_slug": self.project.slug,
  14. },
  15. )
  16. self.login_as(user=self.user)
  17. def test_get(self):
  18. response = self.client.get(self.url)
  19. request = RequestFactory().get(self.url)
  20. self.validate_schema(request, response)