From 5c983f83b1962e6885d01d7792dbe6f61fb7630d Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Tue, 11 Jan 2011 22:38:25 +0100 Subject: [PATCH] improve dbtest_fingerprint.py Signed-off-by: Torsten Werner --- tests/dbtest_fingerprint.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/dbtest_fingerprint.py b/tests/dbtest_fingerprint.py index 58768a0d..c0d23525 100755 --- a/tests/dbtest_fingerprint.py +++ b/tests/dbtest_fingerprint.py @@ -12,8 +12,9 @@ class FingerprintTestCase(DBDakTestCase): fingerprint.fingerprint = 'deadbeefdeadbeef' self.session.add(fingerprint) self.session.commit - fingerprint = self.session.query(Fingerprint).one() - self.assertEqual('deadbeefdeadbeef', fingerprint.fingerprint) + query = self.session.query(Fingerprint) + self.assertEqual(1, query.count()) + self.assertEqual('deadbeefdeadbeef', query.one().fingerprint) if __name__ == '__main__': unittest.main() -- 2.39.5