From 934c07e6c1e9257562d0c38e61f3daa6a9af3cc1 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Fri, 21 Jan 2011 15:09:22 +0100 Subject: [PATCH] Simplify DebVersionTestCase. Signed-off-by: Torsten Werner --- tests/dbtest_debversion.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/dbtest_debversion.py b/tests/dbtest_debversion.py index ae4baf1b..c45200d1 100755 --- a/tests/dbtest_debversion.py +++ b/tests/dbtest_debversion.py @@ -48,13 +48,13 @@ class DebVersionTestCase(DBDakTestCase): self.assertEqual(0, q.filter(Version.version > '1.0').count()) self.assertEqual(2, q.filter(Version.version != '1.0').count()) self.assertEqual(2, q.filter(Version.version.in_(['0.5~', '1.0'])).count()) - q = self.session.query(func.min(Version.version).label('min')) - self.assertEqual('0.5~', q.one().min) - q = self.session.query(func.max(Version.version).label('max')) - self.assertEqual('1.0', q.one().max) + q = self.session.query(func.min(Version.version)) + self.assertEqual('0.5~', q.scalar()) + q = self.session.query(func.max(Version.version)) + self.assertEqual('1.0', q.scalar()) def tearDown(self): - self.session.close() + self.session.rollback() self.version_table.drop() super(DebVersionTestCase, self).tearDown() -- 2.39.5