mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-08 07:33:38 +00:00
Feature: openapi spec, full api browser (#8948)
This commit is contained in:
1 parent
c316ae369b
commit
1dc80f04cb
19 files changed
+1048
-255
No files matched your search
@@ -88,14 +88,14 @@ class TestApiAuth(DirectoriesMixin, APITestCase):
|
||||
)
|
||||
|
||||
def test_api_version_no_auth(self):
|
||||
response = self.client.get("/api/")
|
||||
response = self.client.get("/api/documents/")
|
||||
self.assertNotIn("X-Api-Version", response)
|
||||
self.assertNotIn("X-Version", response)
|
||||
|
||||
def test_api_version_with_auth(self):
|
||||
user = User.objects.create_superuser(username="test")
|
||||
self.client.force_authenticate(user)
|
||||
response = self.client.get("/api/")
|
||||
response = self.client.get("/api/documents/")
|
||||
self.assertIn("X-Api-Version", response)
|
||||
self.assertIn("X-Version", response)
|
||||
|
||||
|
||||
Reference in new issue
Block a user