chore(api): remove suprflous test case in Common ViewSet TestSuite

ref: #896 #730 #895
This commit is contained in:
2025-07-27 14:57:12 +09:30
parent 7018c2d963
commit 04409ed2c8
2 changed files with 11 additions and 37 deletions

View File

@ -26,4 +26,13 @@
},
"telemetry.feedback.enabled": false,
"python.languageServer": "None",
"debug.javascript.enableNetworkView": false,
"typescript.experimental.expandableHover": false,
"ipynb.experimental.serialization": false,
"notebook.experimental.generate": false,
"extensions.experimental.issueQuickAccess": false,
"workbench.commandPalette.experimental.enableNaturalLanguageSearch": false,
"multiDiffEditor.experimental.enabled": false,
"diffEditor.experimental.showEmptyDecorations": false,
"editor.experimental.asyncTokenization": false,
}

View File

@ -690,7 +690,7 @@ class ModelViewSetBaseCases(
'value': '[0-9]+'
},
'model': {
'type': object,
'type': django.db.models.base.ModelBase,
'value': None
},
'queryset': {
@ -2411,42 +2411,7 @@ class ModelViewSetInheritedCases(
Use this Test Suite for ViewSet classes that inherit from ModelViewSet
"""
http_options_response_list = None
"""Inherited class must make and store here a HTTP/Options request"""
route_name = None
"""Inherited class must define the url rout name with namespace"""
# viewset = None
def test_api_render_field_allowed_methods_values(self):
"""Attribute Test
Attribute `allowed_methods` only contains valid values
"""
# Values valid for model views
valid_values: list = [
'DELETE',
'GET',
'HEAD',
'OPTIONS',
'PATCH',
'POST',
'PUT',
]
all_valid: bool = True
for method in list(self.http_options_response_list.data['allowed_methods']):
if method not in valid_values:
all_valid = False
assert all_valid
pass