]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - apt_p2p_Khashmir/db.py
Reorder the main application to find cached hashes before checking freshness.
[quix0rs-apt-p2p.git] / apt_p2p_Khashmir / db.py
index bd777b60e78f65126859645a29152b49aeab80bd..a7962566cc5a07eb99c0744b65eb81389f8b45bc 100644 (file)
@@ -150,7 +150,7 @@ class DB:
         
     def keyStats(self):
         """Count the total number of keys and values in the database.
-        @rtype: (C{int), C{int})
+        @rtype: (C{int}, C{int})
         @return: the number of distinct keys and total values in the database
         """
         c = self.conn.cursor()
@@ -182,6 +182,7 @@ class TestDB(unittest.TestCase):
         
     def test_Value(self):
         self.store.storeValue(self.key, self.key)
+        self.failUnlessEqual(self.store.countValues(self.key), 1)
         val = self.store.retrieveValues(self.key)
         self.failUnlessEqual(len(val), 1)
         self.failUnlessEqual(val[0], self.key)