@@ -76,6 +76,7 @@ def test_text_field_model_generation(self):
76
76
type = "text" ,
77
77
required = True
78
78
)
79
+ field # To silence ruff error
79
80
80
81
model = self .custom_object_type .get_model ()
81
82
instance = model .objects .create (name = "Test" , description = "Test description" )
@@ -106,6 +107,7 @@ def test_long_text_field_model_generation(self):
106
107
label = "Content" ,
107
108
type = "longtext"
108
109
)
110
+ field # To silence ruff error
109
111
110
112
model = self .custom_object_type .get_model ()
111
113
long_content = "This is a very long text content that should be stored in a TextField."
@@ -169,6 +171,7 @@ def test_integer_field_model_generation(self):
169
171
type = "integer" ,
170
172
default = 10
171
173
)
174
+ field # To silence ruff error
172
175
173
176
model = self .custom_object_type .get_model ()
174
177
instance = model .objects .create (name = "Test" , count = 25 )
@@ -231,6 +234,7 @@ def test_decimal_field_model_generation(self):
231
234
type = "decimal" ,
232
235
default = 10.50
233
236
)
237
+ field # To silence ruff error
234
238
235
239
model = self .custom_object_type .get_model ()
236
240
instance = model .objects .create (name = "Test" , price = Decimal ("25.75" ))
@@ -282,6 +286,7 @@ def test_boolean_field_model_generation(self):
282
286
type = "boolean" ,
283
287
default = True
284
288
)
289
+ field # To silence ruff error
285
290
286
291
model = self .custom_object_type .get_model ()
287
292
instance = model .objects .create (name = "Test" , active = False )
@@ -332,6 +337,7 @@ def test_date_field_model_generation(self):
332
337
label = "Created Date" ,
333
338
type = "date"
334
339
)
340
+ field # To silence ruff error
335
341
336
342
model = self .custom_object_type .get_model ()
337
343
test_date = date (2023 , 1 , 1 )
@@ -383,6 +389,7 @@ def test_datetime_field_model_generation(self):
383
389
label = "Created DateTime" ,
384
390
type = "datetime"
385
391
)
392
+ field # To silence ruff error
386
393
387
394
model = self .custom_object_type .get_model ()
388
395
test_datetime = datetime (2023 , 1 , 1 , 12 , 0 , 0 )
@@ -433,6 +440,7 @@ def test_url_field_model_generation(self):
433
440
label = "Website" ,
434
441
type = "url"
435
442
)
443
+ field # To silence ruff error
436
444
437
445
model = self .custom_object_type .get_model ()
438
446
instance = model .objects .create (name = "Test" , website = "https://example.com" )
@@ -464,6 +472,7 @@ def test_json_field_model_generation(self):
464
472
label = "Metadata" ,
465
473
type = "json"
466
474
)
475
+ field # To silence ruff error
467
476
468
477
model = self .custom_object_type .get_model ()
469
478
test_data = {"key" : "value" , "number" : 42 , "list" : [1 , 2 , 3 ]}
@@ -522,6 +531,7 @@ def test_select_field_model_generation(self):
522
531
choice_set = self .choice_set ,
523
532
default = "choice1"
524
533
)
534
+ field # To silence ruff error
525
535
526
536
model = self .custom_object_type .get_model ()
527
537
instance = model .objects .create (name = "Test" , status = "choice2" )
@@ -578,6 +588,7 @@ def test_multiselect_field_model_generation(self):
578
588
type = "multiselect" ,
579
589
choice_set = self .choice_set
580
590
)
591
+ field # To silence ruff error
581
592
582
593
model = self .custom_object_type .get_model ()
583
594
instance = model .objects .create (name = "Test" , tags = ["choice1" , "choice3" ])
@@ -615,6 +626,7 @@ def test_object_field_model_generation(self):
615
626
type = "object" ,
616
627
related_object_type = self .device_content_type
617
628
)
629
+ field # To silence ruff error
618
630
619
631
model = self .custom_object_type .get_model ()
620
632
@@ -673,6 +685,7 @@ def test_multiobject_field_model_generation(self):
673
685
type = "multiobject" ,
674
686
related_object_type = self .device_content_type
675
687
)
688
+ field # To silence ruff error
676
689
677
690
model = self .custom_object_type .get_model ()
678
691
@@ -725,6 +738,7 @@ def test_self_referential_object_field(self):
725
738
type = "object" ,
726
739
related_object_type = self .custom_object_type .content_type
727
740
)
741
+ field # To silence ruff error
728
742
729
743
model = self .custom_object_type .get_model ()
730
744
@@ -747,6 +761,7 @@ def test_self_referential_multiobject_field(self):
747
761
type = "multiobject" ,
748
762
related_object_type = self .custom_object_type .content_type
749
763
)
764
+ field # To silence ruff error
750
765
751
766
model = self .custom_object_type .get_model ()
752
767
@@ -789,6 +804,7 @@ def test_cross_referential_object_field(self):
789
804
type = "object" ,
790
805
related_object_type = second_type .content_type
791
806
)
807
+ field # To silence ruff error
792
808
793
809
model1 = self .custom_object_type .get_model ()
794
810
model2 = second_type .get_model ()
@@ -820,6 +836,7 @@ def test_cross_referential_multiobject_field(self):
820
836
type = "multiobject" ,
821
837
related_object_type = second_type .content_type
822
838
)
839
+ field # To silence ruff error
823
840
824
841
model1 = self .custom_object_type .get_model ()
825
842
model2 = second_type .get_model ()
0 commit comments