@@ -190,7 +190,7 @@ def test_single_property(generate_classes):
190
190
ql .Class (name = "MyObject" , final = True ,
191
191
properties = [
192
192
ql .Property (singular = "Foo" , type = "bar" , tablename = "my_objects" ,
193
- tableparams = ["this" , "result" ], doc_name = "foo" ),
193
+ tableparams = ["this" , "result" ], doc = "foo" ),
194
194
])),
195
195
}
196
196
@@ -215,31 +215,31 @@ def test_children(generate_classes):
215
215
ql .Class (name = "MyObject" , final = True ,
216
216
properties = [
217
217
ql .Property (singular = "A" , type = "int" , tablename = "my_objects" ,
218
- tableparams = ["this" , "result" , "_" ], doc_name = "a" ),
218
+ tableparams = ["this" , "result" , "_" ], doc = "a" ),
219
219
ql .Property (singular = "Child1" , type = "int" , tablename = "my_objects" ,
220
220
tableparams = ["this" , "_" , "result" ], prev_child = "" ,
221
- doc_name = "child 1" ),
221
+ doc = "child 1" ),
222
222
ql .Property (singular = "B" , plural = "Bs" , type = "int" ,
223
223
tablename = "my_object_bs" ,
224
224
tableparams = ["this" , "index" , "result" ],
225
- doc_name = "b" , doc_name_plural = "bs" ),
225
+ doc = "b" , doc_plural = "bs" ),
226
226
ql .Property (singular = "Child" , plural = "Children" , type = "int" ,
227
227
tablename = "my_object_children" ,
228
228
tableparams = ["this" , "index" , "result" ], prev_child = "Child1" ,
229
- doc_name = "child" , doc_name_plural = "children" ),
229
+ doc = "child" , doc_plural = "children" ),
230
230
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" ),
232
232
ql .Property (singular = "Child3" , type = "int" , tablename = "my_object_child_3s" ,
233
233
tableparams = ["this" , "result" ], is_optional = True ,
234
- prev_child = "Child" , doc_name = "child 3" ),
234
+ prev_child = "Child" , doc = "child 3" ),
235
235
ql .Property (singular = "D" , plural = "Ds" , type = "int" ,
236
236
tablename = "my_object_ds" ,
237
237
tableparams = ["this" , "index" , "result" ], is_optional = True ,
238
- doc_name = "d" , doc_name_plural = "ds" ),
238
+ doc = "d" , doc_plural = "ds" ),
239
239
ql .Property (singular = "Child4" , plural = "Child4s" , type = "int" ,
240
240
tablename = "my_object_child_4s" ,
241
241
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" ),
243
243
])),
244
244
}
245
245
@@ -256,11 +256,11 @@ def test_single_properties(generate_classes):
256
256
ql .Class (name = "MyObject" , final = True ,
257
257
properties = [
258
258
ql .Property (singular = "One" , type = "x" , tablename = "my_objects" ,
259
- tableparams = ["this" , "result" , "_" , "_" ], doc_name = "one" ),
259
+ tableparams = ["this" , "result" , "_" , "_" ], doc = "one" ),
260
260
ql .Property (singular = "Two" , type = "y" , tablename = "my_objects" ,
261
- tableparams = ["this" , "_" , "result" , "_" ], doc_name = "two" ),
261
+ tableparams = ["this" , "_" , "result" , "_" ], doc = "two" ),
262
262
ql .Property (singular = "Three" , type = "z" , tablename = "my_objects" ,
263
- tableparams = ["this" , "_" , "_" , "result" ], doc_name = "three" ),
263
+ tableparams = ["this" , "_" , "_" , "result" ], doc = "three" ),
264
264
])),
265
265
}
266
266
@@ -278,7 +278,7 @@ def test_optional_property(generate_classes, is_child, prev_child):
278
278
ql .Class (name = "MyObject" , final = True , properties = [
279
279
ql .Property (singular = "Foo" , type = "bar" , tablename = "my_object_foos" ,
280
280
tableparams = ["this" , "result" ],
281
- is_optional = True , prev_child = prev_child , doc_name = "foo" ),
281
+ is_optional = True , prev_child = prev_child , doc = "foo" ),
282
282
])),
283
283
}
284
284
@@ -296,7 +296,7 @@ def test_repeated_property(generate_classes, is_child, prev_child):
296
296
ql .Class (name = "MyObject" , final = True , properties = [
297
297
ql .Property (singular = "Foo" , plural = "Foos" , type = "bar" , tablename = "my_object_foos" ,
298
298
tableparams = ["this" , "index" , "result" ], prev_child = prev_child ,
299
- doc_name = "foo" , doc_name_plural = "foos" ),
299
+ doc = "foo" , doc_plural = "foos" ),
300
300
])),
301
301
}
302
302
@@ -315,7 +315,7 @@ def test_repeated_optional_property(generate_classes, is_child, prev_child):
315
315
ql .Class (name = "MyObject" , final = True , properties = [
316
316
ql .Property (singular = "Foo" , plural = "Foos" , type = "bar" , tablename = "my_object_foos" ,
317
317
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" ),
319
319
])),
320
320
}
321
321
@@ -346,7 +346,7 @@ def test_single_class_property(generate_classes, is_child, prev_child):
346
346
ql .Property (singular = "Foo" , type = "Bar" , tablename = "my_objects" ,
347
347
tableparams = [
348
348
"this" , "result" ],
349
- prev_child = prev_child , doc_name = "foo" ),
349
+ prev_child = prev_child , doc = "foo" ),
350
350
],
351
351
)),
352
352
"Bar.qll" : (ql .Stub (name = "Bar" , base_import = gen_import_prefix + "Bar" ),
@@ -644,43 +644,43 @@ def test_property_description(generate_classes):
644
644
ql .Class (name = "MyObject" , final = True ,
645
645
properties = [
646
646
ql .Property (singular = "Foo" , type = "bar" , tablename = "my_objects" ,
647
- tableparams = ["this" , "result" ], doc_name = "foo" ,
647
+ tableparams = ["this" , "result" ], doc = "foo" ,
648
648
description = description ),
649
649
])),
650
650
}
651
651
652
652
653
- def test_property_doc_name_override (generate_classes ):
653
+ def test_property_doc_override (generate_classes ):
654
654
assert generate_classes ([
655
655
schema .Class ("MyObject" , properties = [
656
- schema .SingleProperty ("foo" , "bar" , doc_name = "baz" )]),
656
+ schema .SingleProperty ("foo" , "bar" , doc = "baz" )]),
657
657
]) == {
658
658
"MyObject.qll" : (ql .Stub (name = "MyObject" , base_import = gen_import_prefix + "MyObject" ),
659
659
ql .Class (name = "MyObject" , final = True ,
660
660
properties = [
661
661
ql .Property (singular = "Foo" , type = "bar" , tablename = "my_objects" ,
662
- tableparams = ["this" , "result" ], doc_name = "baz" ),
662
+ tableparams = ["this" , "result" ], doc = "baz" ),
663
663
])),
664
664
}
665
665
666
666
667
- def test_repeated_property_doc_name_override (generate_classes ):
667
+ def test_repeated_property_doc_override (generate_classes ):
668
668
assert generate_classes ([
669
669
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" )]),
672
672
]) == {
673
673
"MyObject.qll" : (ql .Stub (name = "MyObject" , base_import = gen_import_prefix + "MyObject" ),
674
674
ql .Class (name = "MyObject" , final = True ,
675
675
properties = [
676
676
ql .Property (singular = "X" , plural = "Xes" , type = "int" ,
677
677
tablename = "my_object_xes" ,
678
678
tableparams = ["this" , "index" , "result" ],
679
- doc_name = "child" , doc_name_plural = "children" ),
679
+ doc = "child" , doc_plural = "children" ),
680
680
ql .Property (singular = "Y" , plural = "Ys" , type = "int" ,
681
681
tablename = "my_object_ies" , is_optional = True ,
682
682
tableparams = ["this" , "index" , "result" ],
683
- doc_name = "child" , doc_name_plural = "children" ),
683
+ doc = "child" , doc_plural = "children" ),
684
684
])),
685
685
}
686
686
0 commit comments