def METHOD_NAME():
    '''Test that children added to RegionDirective are validated.
        RegionDirective accepts 1 Schedule as child.
    '''
    directive = RegionDirective()
    datanode = Literal("1", INTEGER_TYPE)
    schedule = Schedule()
    # First child
    with pytest.raises(GenerationError) as excinfo:
        directive.children[0] = datanode
    assert ("Item 'Literal' can't be child 0 of 'RegionDirective'. The valid "
            "format is: 'Schedule'." in str(excinfo.value))
    # Additional children
    with pytest.raises(GenerationError) as excinfo:
        directive.addchild(schedule)
    assert ("Item 'Schedule' can't be child 1 of 'RegionDirective'. The valid "
            "format is: 'Schedule'." in str(excinfo.value))