def test_validate_data_table(data_table_state: rx.State, expected):
    """Test the str/render function.

    Args:
        data_table_state: The state fixture.
        expected: expected var name.

    """
    if not types.is_dataframe(data_table_state.data._var_type):
        data_table_component = DataTable.create(
            data=data_table_state.data, columns=data_table_state.columns
        )
    else:
        data_table_component = DataTable.create(data=data_table_state.data)

    data_table_dict = data_table_component.render()

    # prefix expected with state name
    state_name = data_table_state.get_name()
    expected = f"{state_name}.{expected}" if expected else state_name

    assert data_table_dict["props"] == [
        f"columns:{expected}.columns",
        f"data:{expected}.data",
    ]
Test the str/render function.

    Args:
        data_table_state: The state fixture.
        expected: expected var name.

    
tests/units/components/datadisplay/test_datatable.py