def test_sorted_with_fields(self): expected_sql = 'SELECT f1,f2 FROM (%s) ORDER BY f1 LIMIT 5' % TestCases.BASE_SQL self._apply_sampling(Sampling.sorted('f1', fields=['f1', 'f2']), expected_sql)
def test_sorted_descending(self): expected_sql = 'SELECT * FROM (%s) ORDER BY f1 DESC LIMIT 5' % TestCases.BASE_SQL self._apply_sampling(Sampling.sorted('f1', ascending=False), expected_sql)