test_shortid.py 708 B

12345678910111213141516171819202122232425
  1. from django.test.client import RequestFactory
  2. from django.urls import reverse
  3. from fixtures.apidocs_test_case import APIDocsTestCase
  4. class OrganizationShortIDDocs(APIDocsTestCase):
  5. def setUp(self):
  6. group = self.create_group(project=self.project)
  7. self.url = reverse(
  8. "sentry-api-0-short-id-lookup",
  9. kwargs={
  10. "organization_id_or_slug": self.organization.slug,
  11. "short_id": group.qualified_short_id,
  12. },
  13. )
  14. self.login_as(user=self.user)
  15. def test_get(self):
  16. response = self.client.get(self.url)
  17. request = RequestFactory().get(self.url)
  18. self.validate_schema(request, response)