Example #1
0
File: models.py Project: f3at/feat
 def do_count(self, value):
     return query.count(self.connection, value)
Example #2
0
 def _test(self, result, *parts, **kwargs):
     q = query.Query(DummyView, *parts, sorting=kwargs.pop('sorting', None))
     count = yield query.count(self.connection, q)
     self.assertEquals(len(result), count)
     res = yield query.select(self.connection, q)
     self.assertEquals(result, res)
Example #3
0
 def _query_test(self, result, *parts, **kwargs):
     q = query.Query(QueryView, *parts, sorting=kwargs.pop('sorting', None))
     res = yield query.select(self.connection, q)
     self.assertEquals(result, [x.field1 for x in res])
     count = yield query.count(self.connection, q)
     self.assertEquals(len(result), count)