def test_column_repr(): column = Column(Integer, name="f") column.model = User column.model_name = "foo" assert repr(column) == "<Column[User.foo]>" column.hash_key = True assert repr(column) == "<Column[User.foo=hash]>" column.hash_key = False column.range_key = True assert repr(column) == "<Column[User.foo=range]>"
def test_column_repr_path(): column = Column(Integer, name="f") column.model = User column.model_name = "foo" assert repr( column[3]["foo"]["bar"][2][1]) == "<Proxy[User.foo[3].foo.bar[2][1]]>" column.hash_key = True assert repr( column[3]["foo"]["bar"][2][1]) == "<Proxy[User.foo[3].foo.bar[2][1]]>"