test_project_index.py 661 B

1234567891011121314151617181920
  1. from django.test.client import RequestFactory
  2. from django.urls import reverse
  3. from fixtures.apidocs_test_case import APIDocsTestCase
  4. class ProjectIndexDocs(APIDocsTestCase):
  5. def setUp(self):
  6. self.org = self.create_organization(owner=self.user)
  7. self.team = self.create_team(organization=self.org, members=[self.user])
  8. self.project = self.create_project(teams=[self.team])
  9. self.login_as(user=self.user)
  10. self.url = reverse("sentry-api-0-projects")
  11. def test_get(self):
  12. response = self.client.get(self.url)
  13. request = RequestFactory().get(self.url)
  14. self.validate_schema(request, response)