def test_command_handler_to_status_with_exclude_from_status():
    ch = CommandHandler(
        name="handler",
        command="/cmd",
        description="command handler",
        func=lambda x: x,
        use_as_default_handler=True,
    )
    assert not ch.to_status_command()
def test_command_handler_to_status_with_simple_handler():
    ch = CommandHandler(name="handler",
                        command="/cmd",
                        description="command handler",
                        func=lambda x: x)
    assert ch.to_status_command() == StatusCommand(
        body="/cmd",
        name="handler",
        description="command handler",
        options=[],
        elements=[],
    )