test_org_index.py 561 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 OrganizationIndexDocs(APIDocsTestCase):
  5. def setUp(self):
  6. self.create_organization(owner=self.user, name="Rowdy Tiger")
  7. self.url = reverse(
  8. "sentry-api-0-organizations",
  9. )
  10. self.login_as(user=self.user)
  11. def test_get(self):
  12. response = self.client.get(self.url)
  13. request = RequestFactory().get(self.url)
  14. self.validate_schema(request, response)