]> git.decadent.org.uk Git - dak.git/commitdiff
improve dbtest_fingerprint.py
authorTorsten Werner <twerner@debian.org>
Tue, 11 Jan 2011 21:38:25 +0000 (22:38 +0100)
committerTorsten Werner <twerner@debian.org>
Tue, 11 Jan 2011 21:38:25 +0000 (22:38 +0100)
Signed-off-by: Torsten Werner <twerner@debian.org>
tests/dbtest_fingerprint.py

index 58768a0d807265badef03160261dfc57d837f951..c0d23525479cf698968174a56b69c7f142767871 100755 (executable)
@@ -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()