Пример #1
0
def test_argument():
    query_part = Eq(Value(42), Argument("testarg"))

    sql = query_part.render()

    eq_(sql, "42 = %(testarg)s")
Пример #2
0
def test_argument_preset():
    query_part = Eq(Value(42), Argument("testarg", Value(55)))

    sql = query_part.render()

    eq_(sql, "42 = 55")
Пример #3
0
def test_eq():
    query_part = Eq(Value(42), Value(42))

    sql = query_part.render()

    eq_(sql, "42 = 42")