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

    column.bind_to(table, "epsilon")

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

    column.bind_to(table, "epsilon")

    assert column.name == "epsilon"
예제 #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")
예제 #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")
예제 #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")
예제 #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")