Browse Source

ref: move apidocs test case to fixtures namespace (#35468)

anthony sottile 2 years ago
parent
commit
97f7c7ada9

+ 1 - 1
tests/apidocs/util.py → fixtures/apidocs_test_case.py

@@ -15,7 +15,7 @@ class APIDocsTestCase(APITestCase):
 
     def create_schema(self):
         if not APIDocsTestCase.cached_schema:
-            path = os.path.join(os.path.dirname(__file__), "openapi-derefed.json")
+            path = os.path.join(os.path.dirname(__file__), "../tests/apidocs/openapi-derefed.json")
             with open(path) as json_file:
                 data = json.load(json_file)
                 data["servers"][0]["url"] = settings.SENTRY_OPTIONS["system.url-prefix"]

+ 1 - 1
tests/apidocs/endpoints/events/test_group_events.py

@@ -1,7 +1,7 @@
 from django.test.client import RequestFactory
 
+from fixtures.apidocs_test_case import APIDocsTestCase
 from sentry.testutils.helpers.datetime import before_now, iso_format
-from tests.apidocs.util import APIDocsTestCase
 
 
 class ProjectGroupEventBase(APIDocsTestCase):

+ 1 - 1
tests/apidocs/endpoints/events/test_group_hashes.py

@@ -1,6 +1,6 @@
 from django.test.client import RequestFactory
 
-from tests.apidocs.util import APIDocsTestCase
+from fixtures.apidocs_test_case import APIDocsTestCase
 
 
 class ProjectGroupHashesDocs(APIDocsTestCase):

+ 1 - 1
tests/apidocs/endpoints/events/test_group_issue_details.py

@@ -1,7 +1,7 @@
 from django.test.client import RequestFactory
 
+from fixtures.apidocs_test_case import APIDocsTestCase
 from sentry.testutils.helpers.datetime import before_now, iso_format
-from tests.apidocs.util import APIDocsTestCase
 
 
 class ProjectGroupIssueDetailsDocs(APIDocsTestCase):

+ 1 - 1
tests/apidocs/endpoints/events/test_group_tagkey_values.py

@@ -1,6 +1,6 @@
 from django.test.client import RequestFactory
 
-from tests.apidocs.util import APIDocsTestCase
+from fixtures.apidocs_test_case import APIDocsTestCase
 
 
 class GroupTagKeyValuesDocs(APIDocsTestCase):

+ 1 - 1
tests/apidocs/endpoints/events/test_project_event_details.py

@@ -1,7 +1,7 @@
 from django.test.client import RequestFactory
 from django.urls import reverse
 
-from tests.apidocs.util import APIDocsTestCase
+from fixtures.apidocs_test_case import APIDocsTestCase
 
 
 class ProjectEventDetailsDocs(APIDocsTestCase):

+ 1 - 1
tests/apidocs/endpoints/events/test_project_events.py

@@ -1,7 +1,7 @@
 from django.test.client import RequestFactory
 from django.urls import reverse
 
-from tests.apidocs.util import APIDocsTestCase
+from fixtures.apidocs_test_case import APIDocsTestCase
 
 
 class ProjectEventsDocs(APIDocsTestCase):

+ 1 - 1
tests/apidocs/endpoints/events/test_project_issues.py

@@ -1,6 +1,6 @@
 from django.test.client import RequestFactory
 
-from tests.apidocs.util import APIDocsTestCase
+from fixtures.apidocs_test_case import APIDocsTestCase
 
 
 class ProjectIssuesDocs(APIDocsTestCase):

+ 1 - 1
tests/apidocs/endpoints/events/test_project_tagkey_values.py

@@ -1,7 +1,7 @@
 from django.test.client import RequestFactory
 from django.urls import reverse
 
-from tests.apidocs.util import APIDocsTestCase
+from fixtures.apidocs_test_case import APIDocsTestCase
 
 
 class ProjectTagKeyValuesDocs(APIDocsTestCase):

+ 1 - 1
tests/apidocs/endpoints/integration_platform/test_sentry_app_external_issue_details.py

@@ -1,8 +1,8 @@
 from django.test.client import RequestFactory
 from django.urls import reverse
 
+from fixtures.apidocs_test_case import APIDocsTestCase
 from sentry.models import SentryAppInstallation
-from tests.apidocs.util import APIDocsTestCase
 
 
 class SentryAppDetailsDocs(APIDocsTestCase):

Some files were not shown because too many files changed in this diff