Ejemplo n.º 1
0
 def test_distinct_more_exprs(self):
     self.assertEqual(str(Count(('col1', 'col2')).distinct()),
                      'COUNT(DISTINCT "col1", "col2")')
Ejemplo n.º 2
0
 def test_distinct_by_method(self):
     self.assertEqual(str(Count('col').distinct()), 'COUNT(DISTINCT "col")')
Ejemplo n.º 3
0
 def test_distinct_by_method_with_param(self):
     self.assertEqual(str(Count('col').distinct(False)), 'COUNT("col")')
Ejemplo n.º 4
0
 def test_count_without_param(self):
     self.assertEqual(str(Count()), 'COUNT(*)')
Ejemplo n.º 5
0
 def test_distinct(self):
     self.assertEqual(str(Count('col', True)), 'COUNT(DISTINCT "col")')
Ejemplo n.º 6
0
 def test_normal(self):
     self.assertEqual(str(Count('col')), 'COUNT("col")')
Ejemplo n.º 7
0
 def test_count_with_star(self):
     self.assertEqual(str(Count('*')), 'COUNT(*)')
Ejemplo n.º 8
0
 def test_distinct_by_method_with_param(self):
     assert str(Count('col').distinct(False)) == 'COUNT("col")'
Ejemplo n.º 9
0
 def test_distinct_more_exprs(self):
     assert str(Count(('col1', 'col2')).distinct()) == 'COUNT(DISTINCT "col1", "col2")'
Ejemplo n.º 10
0
 def test_distinct_by_method(self):
     assert str(Count('col').distinct()) == 'COUNT(DISTINCT "col")'
Ejemplo n.º 11
0
 def test_distinct(self):
     assert str(Count('col', True)) == 'COUNT(DISTINCT "col")'
Ejemplo n.º 12
0
 def test_count_without_param(self):
     assert str(Count()) == 'COUNT(*)'
Ejemplo n.º 13
0
 def test_count_with_star(self):
     assert str(Count('*')) == 'COUNT(*)'
Ejemplo n.º 14
0
 def test_normal(self):
     assert str(Count('col')) == 'COUNT("col")'