File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -173,6 +173,19 @@ def test_cds_json_serializer_sanitization(video_record_metadata):
173173 'title' : {'title' : '<script>alert("bad")</script> Titre' }
174174 }
175175 ]
176+
177+ record ["_access" ] = {
178+ "key" : "value"
179+ }
180+ record ["_buckets" ] = {
181+ "key" :"value"
182+ }
183+ record ["_cds" ] = {
184+ "key" :"value"
185+ }
186+ record ["_deposit" ] = {
187+ "key" :"value"
188+ }
176189
177190 # Test the serializer
178191 serializer = CDSJSONSerializer ()
@@ -201,3 +214,8 @@ def test_cds_json_serializer_sanitization(video_record_metadata):
201214 translations = result ['metadata' ]['translations' ]
202215 for tr in translations :
203216 assert '<script>' not in tr ['description' ]
217+
218+ assert "_access" not in record
219+ assert "_buckets" not in record
220+ assert "_cds" not in record
221+ assert "_deposit" not in record
You can’t perform that action at this time.
0 commit comments