Fixed dim_dict test for Python 3