Example #1
0
def test_can_be_named_by_binding():
    table = Fake()
    column = Column()

    column.bind_to(table, "epsilon")

    assert column.name == "epsilon"
Example #2
0
def test_can_be_named_by_binding():
    table = Fake()
    column = Column()

    column.bind_to(table, "epsilon")

    assert column.name == "epsilon"
Example #3
0
def test_raises_if_rebound():
    table_a = Fake()
    table_b = Fake()
    column = Column()

    column.bind_to(table_a, "beta")

    assert_raises(AttributeError, column.bind_to, table_b, "gamma")
Example #4
0
def test_can_be_bound():
    table = Fake()
    column = Column()

    column.bind_to(table, "alpha")

    assert column.is_bound == True
    assert column.bound_to == (table, "alpha")
Example #5
0
def test_raises_if_rebound():
    table_a = Fake()
    table_b = Fake()
    column = Column()

    column.bind_to(table_a, "beta")

    assert_raises(AttributeError, column.bind_to, table_b, "gamma")
Example #6
0
def test_can_be_bound():
    table = Fake()
    column = Column()

    column.bind_to(table, "alpha")

    assert column.is_bound == True
    assert column.bound_to == (table, "alpha")