@@ -190,7 +190,7 @@ def test_single_property(generate_classes):
190190 ql .Class (name = "MyObject" , final = True ,
191191 properties = [
192192 ql .Property (singular = "Foo" , type = "bar" , tablename = "my_objects" ,
193- tableparams = ["this" , "result" ], doc_name = "foo" ),
193+ tableparams = ["this" , "result" ], doc = "foo" ),
194194 ])),
195195 }
196196
@@ -215,31 +215,31 @@ def test_children(generate_classes):
215215 ql .Class (name = "MyObject" , final = True ,
216216 properties = [
217217 ql .Property (singular = "A" , type = "int" , tablename = "my_objects" ,
218- tableparams = ["this" , "result" , "_" ], doc_name = "a" ),
218+ tableparams = ["this" , "result" , "_" ], doc = "a" ),
219219 ql .Property (singular = "Child1" , type = "int" , tablename = "my_objects" ,
220220 tableparams = ["this" , "_" , "result" ], prev_child = "" ,
221- doc_name = "child 1" ),
221+ doc = "child 1" ),
222222 ql .Property (singular = "B" , plural = "Bs" , type = "int" ,
223223 tablename = "my_object_bs" ,
224224 tableparams = ["this" , "index" , "result" ],
225- doc_name = "b" , doc_name_plural = "bs" ),
225+ doc = "b" , doc_plural = "bs" ),
226226 ql .Property (singular = "Child" , plural = "Children" , type = "int" ,
227227 tablename = "my_object_children" ,
228228 tableparams = ["this" , "index" , "result" ], prev_child = "Child1" ,
229- doc_name = "child" , doc_name_plural = "children" ),
229+ doc = "child" , doc_plural = "children" ),
230230 ql .Property (singular = "C" , type = "int" , tablename = "my_object_cs" ,
231- tableparams = ["this" , "result" ], is_optional = True , doc_name = "c" ),
231+ tableparams = ["this" , "result" ], is_optional = True , doc = "c" ),
232232 ql .Property (singular = "Child3" , type = "int" , tablename = "my_object_child_3s" ,
233233 tableparams = ["this" , "result" ], is_optional = True ,
234- prev_child = "Child" , doc_name = "child 3" ),
234+ prev_child = "Child" , doc = "child 3" ),
235235 ql .Property (singular = "D" , plural = "Ds" , type = "int" ,
236236 tablename = "my_object_ds" ,
237237 tableparams = ["this" , "index" , "result" ], is_optional = True ,
238- doc_name = "d" , doc_name_plural = "ds" ),
238+ doc = "d" , doc_plural = "ds" ),
239239 ql .Property (singular = "Child4" , plural = "Child4s" , type = "int" ,
240240 tablename = "my_object_child_4s" ,
241241 tableparams = ["this" , "index" , "result" ], is_optional = True ,
242- prev_child = "Child3" , doc_name = "child 4" , doc_name_plural = "child 4s" ),
242+ prev_child = "Child3" , doc = "child 4" , doc_plural = "child 4s" ),
243243 ])),
244244 }
245245
@@ -256,11 +256,11 @@ def test_single_properties(generate_classes):
256256 ql .Class (name = "MyObject" , final = True ,
257257 properties = [
258258 ql .Property (singular = "One" , type = "x" , tablename = "my_objects" ,
259- tableparams = ["this" , "result" , "_" , "_" ], doc_name = "one" ),
259+ tableparams = ["this" , "result" , "_" , "_" ], doc = "one" ),
260260 ql .Property (singular = "Two" , type = "y" , tablename = "my_objects" ,
261- tableparams = ["this" , "_" , "result" , "_" ], doc_name = "two" ),
261+ tableparams = ["this" , "_" , "result" , "_" ], doc = "two" ),
262262 ql .Property (singular = "Three" , type = "z" , tablename = "my_objects" ,
263- tableparams = ["this" , "_" , "_" , "result" ], doc_name = "three" ),
263+ tableparams = ["this" , "_" , "_" , "result" ], doc = "three" ),
264264 ])),
265265 }
266266
@@ -278,7 +278,7 @@ def test_optional_property(generate_classes, is_child, prev_child):
278278 ql .Class (name = "MyObject" , final = True , properties = [
279279 ql .Property (singular = "Foo" , type = "bar" , tablename = "my_object_foos" ,
280280 tableparams = ["this" , "result" ],
281- is_optional = True , prev_child = prev_child , doc_name = "foo" ),
281+ is_optional = True , prev_child = prev_child , doc = "foo" ),
282282 ])),
283283 }
284284
@@ -296,7 +296,7 @@ def test_repeated_property(generate_classes, is_child, prev_child):
296296 ql .Class (name = "MyObject" , final = True , properties = [
297297 ql .Property (singular = "Foo" , plural = "Foos" , type = "bar" , tablename = "my_object_foos" ,
298298 tableparams = ["this" , "index" , "result" ], prev_child = prev_child ,
299- doc_name = "foo" , doc_name_plural = "foos" ),
299+ doc = "foo" , doc_plural = "foos" ),
300300 ])),
301301 }
302302
@@ -315,7 +315,7 @@ def test_repeated_optional_property(generate_classes, is_child, prev_child):
315315 ql .Class (name = "MyObject" , final = True , properties = [
316316 ql .Property (singular = "Foo" , plural = "Foos" , type = "bar" , tablename = "my_object_foos" ,
317317 tableparams = ["this" , "index" , "result" ], is_optional = True ,
318- prev_child = prev_child , doc_name = "foo" , doc_name_plural = "foos" ),
318+ prev_child = prev_child , doc = "foo" , doc_plural = "foos" ),
319319 ])),
320320 }
321321
@@ -346,7 +346,7 @@ def test_single_class_property(generate_classes, is_child, prev_child):
346346 ql .Property (singular = "Foo" , type = "Bar" , tablename = "my_objects" ,
347347 tableparams = [
348348 "this" , "result" ],
349- prev_child = prev_child , doc_name = "foo" ),
349+ prev_child = prev_child , doc = "foo" ),
350350 ],
351351 )),
352352 "Bar.qll" : (ql .Stub (name = "Bar" , base_import = gen_import_prefix + "Bar" ),
@@ -644,43 +644,43 @@ def test_property_description(generate_classes):
644644 ql .Class (name = "MyObject" , final = True ,
645645 properties = [
646646 ql .Property (singular = "Foo" , type = "bar" , tablename = "my_objects" ,
647- tableparams = ["this" , "result" ], doc_name = "foo" ,
647+ tableparams = ["this" , "result" ], doc = "foo" ,
648648 description = description ),
649649 ])),
650650 }
651651
652652
653- def test_property_doc_name_override (generate_classes ):
653+ def test_property_doc_override (generate_classes ):
654654 assert generate_classes ([
655655 schema .Class ("MyObject" , properties = [
656- schema .SingleProperty ("foo" , "bar" , doc_name = "baz" )]),
656+ schema .SingleProperty ("foo" , "bar" , doc = "baz" )]),
657657 ]) == {
658658 "MyObject.qll" : (ql .Stub (name = "MyObject" , base_import = gen_import_prefix + "MyObject" ),
659659 ql .Class (name = "MyObject" , final = True ,
660660 properties = [
661661 ql .Property (singular = "Foo" , type = "bar" , tablename = "my_objects" ,
662- tableparams = ["this" , "result" ], doc_name = "baz" ),
662+ tableparams = ["this" , "result" ], doc = "baz" ),
663663 ])),
664664 }
665665
666666
667- def test_repeated_property_doc_name_override (generate_classes ):
667+ def test_repeated_property_doc_override (generate_classes ):
668668 assert generate_classes ([
669669 schema .Class ("MyObject" , properties = [
670- schema .RepeatedProperty ("x" , "int" , doc_name = "children" ),
671- schema .RepeatedOptionalProperty ("y" , "int" , doc_name = "child" )]),
670+ schema .RepeatedProperty ("x" , "int" , doc = "children" ),
671+ schema .RepeatedOptionalProperty ("y" , "int" , doc = "child" )]),
672672 ]) == {
673673 "MyObject.qll" : (ql .Stub (name = "MyObject" , base_import = gen_import_prefix + "MyObject" ),
674674 ql .Class (name = "MyObject" , final = True ,
675675 properties = [
676676 ql .Property (singular = "X" , plural = "Xes" , type = "int" ,
677677 tablename = "my_object_xes" ,
678678 tableparams = ["this" , "index" , "result" ],
679- doc_name = "child" , doc_name_plural = "children" ),
679+ doc = "child" , doc_plural = "children" ),
680680 ql .Property (singular = "Y" , plural = "Ys" , type = "int" ,
681681 tablename = "my_object_ies" , is_optional = True ,
682682 tableparams = ["this" , "index" , "result" ],
683- doc_name = "child" , doc_name_plural = "children" ),
683+ doc = "child" , doc_plural = "children" ),
684684 ])),
685685 }
686686
0 commit comments