def test_sql_value(self):
     self.assertTrue(isinstance(sqlpuzzle.V('5'), SqlValue))
Exemple #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\'')
 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\''
def test_sql_value():
    assert isinstance(sqlpuzzle.V('5'), SqlValue)
def test_default_relation_of_sql_value_with_none(where):
    where.where('col', sqlpuzzle.V(None))
    assert str(where) == 'WHERE "col" IS NULL'
def test_default_relation_of_sql_value_with_number(where):
    where.where('col', sqlpuzzle.V(123))
    assert str(where) == 'WHERE "col" = 123'
 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')
 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')