From: Torsten Werner Date: Tue, 11 Jan 2011 21:38:25 +0000 (+0100) Subject: improve dbtest_fingerprint.py X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c983f83b1962e6885d01d7792dbe6f61fb7630d;p=dak improve dbtest_fingerprint.py Signed-off-by: Torsten Werner --- 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()