summaryrefslogtreecommitdiff
path: root/test/orm/generative.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/orm/generative.py')
-rw-r--r--test/orm/generative.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/orm/generative.py b/test/orm/generative.py
index 6cda21964..512f04ae9 100644
--- a/test/orm/generative.py
+++ b/test/orm/generative.py
@@ -59,6 +59,7 @@ class GenerativeQueryTest(PersistTest):
assert self.query.count() == 100
assert self.query.filter(foo.c.bar<30).min(foo.c.bar) == 0
assert self.query.filter(foo.c.bar<30).max(foo.c.bar) == 29
+ assert self.query.filter(foo.c.bar<30).apply_max(foo.c.bar).scalar() == 29
@testbase.unsupported('mysql')
def test_aggregate_1(self):
@@ -73,6 +74,9 @@ class GenerativeQueryTest(PersistTest):
def test_aggregate_2_int(self):
assert int(self.res.filter(foo.c.bar<30).avg(foo.c.bar)) == 14
+ def test_aggregate_3(self):
+ assert self.res.filter(foo.c.bar<30).apply_avg(foo.c.bar).scalar() == 14.5
+
def test_filter(self):
assert self.query.count() == 100
assert self.query.filter(Foo.c.bar < 30).count() == 30