def METHOD_NAME(mock_packages):
    list_json = "[]"
    with pytest.raises(spack.tag.TagIndexError) as e:
        spack.tag.TagIndex.from_json(io.StringIO(list_json), repository=mock_packages)
        assert "not a dict" in str(e)