~lifeless/storm/bug-620615

« back to all changes in this revision

Viewing changes to tests/store/base.py

Add a test for having without group by

Show diffs side-by-side

added added

removed removed

Lines of Context:
1162
1162
            ).having(Count() == 5)
1163
1163
        self.assertEquals(list(result), [16])
1164
1164
 
 
1165
    def test_find_having_without_group_by(self):
 
1166
        result = self.store.find(FooValue)
 
1167
        self.assertRaises(ExprError, result.having, FooValue.value1 == 1)
 
1168
 
1165
1169
    def test_find_group_by_multiple_having(self):
1166
1170
        result = self.store.find((Count(), FooValue.value2)
1167
1171
            ).group_by(FooValue.value2