mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Suppress warnings from drf_spectacular when testing schema API view
This commit is contained in:
parent
b8c0c0faeb
commit
dcdb0b8846
@ -1,5 +1,6 @@
|
||||
from django.test import Client, TestCase, override_settings
|
||||
from django.urls import reverse
|
||||
from drf_spectacular.drainage import GENERATOR_STATS
|
||||
from rest_framework import status
|
||||
|
||||
from core.models import ObjectType
|
||||
@ -264,5 +265,6 @@ class APIDocsTestCase(TestCase):
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
url = reverse('schema')
|
||||
with GENERATOR_STATS.silence(): # Suppress schema generator warnings
|
||||
response = self.client.get(url)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
Loading…
Reference in New Issue
Block a user