def test_dict_indexing():
    """Test that we can index into dict vars."""
    dct = Var(_js_expr="dct").to(ObjectVar, dict[str, str])

    # Check correct indexing.
    assert str(dct["a"]) == 'dct["a"]'
    assert str(dct["asdf"]) == 'dct["asdf"]'
Test that we can index into dict vars.
tests/units/test_var.py