Пример #1
0
 def test_sql_value(self):
     self.assertTrue(isinstance(sqlpuzzle.V('5'), SqlValue))
Пример #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\'')
Пример #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\''
Пример #4
0
def test_sql_value():
    assert isinstance(sqlpuzzle.V('5'), SqlValue)
Пример #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'
Пример #6
0
def test_default_relation_of_sql_value_with_number(where):
    where.where('col', sqlpuzzle.V(123))
    assert str(where) == 'WHERE "col" = 123'
Пример #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')
Пример #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')