def METHOD_NAME(dttm: str, grain: str, expected: str) -> None:
    from superset.db_engine_specs.sqlite import SqliteEngineSpec
    engine = create_engine("sqlite://")
    connection = engine.connect()
    connection.execute("CREATE TABLE t (dttm DATETIME)")
    connection.execute("INSERT INTO t VALUES (?)", dttm)
    # pylint: disable=protected-access
    expression = SqliteEngineSpec._time_grain_expressions[grain].format(col="dttm")
    sql = f"SELECT {expression} FROM t"
    result = connection.execute(sql).scalar()
    assert result == expected