]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Fix test helper _check_version_in_local_db
authorDavid Stainton <dstainton415@gmail.com>
Tue, 3 Nov 2015 12:28:28 +0000 (13:28 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Tue, 3 Nov 2015 22:26:07 +0000 (22:26 +0000)
src/allmydata/test/test_magic_folder.py

index 0d09b9c112e6b2595c89142d9306454a4244071e..b4f1c9cf6917887dc566591c501486676bbd8913 100644 (file)
@@ -656,9 +656,10 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual
         return d
 
     def _check_version_in_local_db(self, magicfolder, relpath_u, expected_version):
-        version = magicfolder._db.get_local_file_version(relpath_u)
-        #print "_check_version_in_local_db: %r has version %s" % (relpath_u, version)
-        self.failUnlessEqual(version, expected_version)
+        db_entry = magicfolder._db.get_db_entry(relpath_u)
+        if db_entry is not None:
+            #print "_check_version_in_local_db: %r has version %s" % (relpath_u, version)
+            self.failUnlessEqual(db_entry.version, expected_version)
 
     def _check_file_gone(self, magicfolder, relpath_u):
         path = os.path.join(magicfolder.uploader._local_path_u, relpath_u)