Skip to content

Commit ec23b20

Browse files
Maffoochclaude
andcommitted
test: add questionnaire models to no_api_models exclusion list
The questionnaire UI feature stays but the API surface is gone, so the Question / Answer / *_Survey models no longer have a serializer. The test_is_defined check requires every model to be either covered by a serializer or explicitly listed as no_api_models — add them there. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent fde7a5c commit ec23b20

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

unittests/test_apiv2_methods_and_endpoints.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,21 @@
44
from dojo.api_v2 import serializers
55
from dojo.models import (
66
CWE,
7+
Answer,
8+
Answered_Survey,
79
BannerConf,
810
Benchmark_Category,
911
Benchmark_Product,
1012
Benchmark_Product_Summary,
1113
Benchmark_Requirement,
1214
Benchmark_Type,
1315
Choice,
16+
ChoiceAnswer,
17+
ChoiceQuestion,
1418
Contact,
19+
Engagement_Survey,
1520
FileAccessToken,
21+
General_Survey,
1622
GITHUB_Clone,
1723
GITHUB_Conf,
1824
GITHUB_Details_Cache,
@@ -21,9 +27,12 @@
2127
Objects_Product,
2228
Objects_Review,
2329
Product_Line,
30+
Question,
2431
Report_Type,
2532
Testing_Guide,
2633
Testing_Guide_Category,
34+
TextAnswer,
35+
TextQuestion,
2736
Tool_Product_History,
2837
UserAnnouncement,
2938
)
@@ -131,6 +140,17 @@ def setUp(self):
131140
Benchmark_Product,
132141
Benchmark_Product_Summary,
133142
Choice,
143+
# Questionnaire models: API endpoints removed in 2.59 (announced
144+
# 2.56), but the UI feature under dojo/survey/ still uses them.
145+
Question,
146+
TextQuestion,
147+
ChoiceQuestion,
148+
Answer,
149+
TextAnswer,
150+
ChoiceAnswer,
151+
Answered_Survey,
152+
Engagement_Survey,
153+
General_Survey,
134154
]
135155

136156
def test_is_defined(self):

0 commit comments

Comments
 (0)