Exemplo n.º 1
0
 def test_sql_value(self):
     self.assertTrue(isinstance(sqlpuzzle.V('5'), SqlValue))
Exemplo n.º 2
0
 def test_sqlvalue(self):
     self.tables.set('t')
     self.tables.join('u').on('col', sqlpuzzle.V('x'))
     self.assertEqual(str(self.tables), '"t" JOIN "u" ON "col" = \'x\'')
Exemplo n.º 3
0
 def test_sqlvalue(self, tables):
     tables.set('t')
     tables.join('u').on('col', sqlpuzzle.V('x'))
     assert str(tables) == '"t" JOIN "u" ON "col" = \'x\''
Exemplo n.º 4
0
def test_sql_value():
    assert isinstance(sqlpuzzle.V('5'), SqlValue)
Exemplo n.º 5
0
def test_default_relation_of_sql_value_with_none(where):
    where.where('col', sqlpuzzle.V(None))
    assert str(where) == 'WHERE "col" IS NULL'
Exemplo n.º 6
0
def test_default_relation_of_sql_value_with_number(where):
    where.where('col', sqlpuzzle.V(123))
    assert str(where) == 'WHERE "col" = 123'
Exemplo n.º 7
0
 def test_default_relation_of_sql_value_with_none(self):
     self.where.where('col', sqlpuzzle.V(None))
     self.assertEqual(str(self.where), 'WHERE "col" IS NULL')
Exemplo n.º 8
0
 def test_default_relation_of_sql_value_with_number(self):
     self.where.where('col', sqlpuzzle.V(123))
     self.assertEqual(str(self.where), 'WHERE "col" = 123')