File tree 1 file changed +28
-0
lines changed
w3/python/core/fundamental_interface 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -473,5 +473,33 @@ def test_Raises_NO_MODIFICATION_ALLOWED_ERR(self):
473
473
self .fail ()
474
474
475
475
476
+ class Test_HasChild (unittest .TestCase ):
477
+ def test_True (self ):
478
+ # ======================================
479
+ # <document>
480
+ # <parent_node>
481
+ # <child_node/>
482
+ # </parent_node>
483
+ # <document>
484
+ # ======================================
485
+ document = _create_document_node ()
486
+ parent_node = _create_element_node (document )
487
+ child_node = _create_element_node (document )
488
+ parent_node .append_child (child_node )
489
+ # Testing
490
+ self .assertTrue (parent_node .has_child_nodes ())
491
+
492
+ def test_False (self ):
493
+ # ======================================
494
+ # <document>
495
+ # <node/>
496
+ # <document>
497
+ # ======================================
498
+ document = _create_document_node ()
499
+ node = _create_element_node (document )
500
+ # Testing
501
+ self .assertFalse (node .has_child_nodes ())
502
+
503
+
476
504
if __name__ == '__main__' :
477
505
unittest .main ()
You can’t perform that action at this time.
0 commit comments