From: meejah Date: Thu, 8 Oct 2015 19:11:43 +0000 (-0600) Subject: fix alice_bob_test to check for proper deletion X-Git-Url: https://git.rkrishnan.org/components/%22news.html/frontends?a=commitdiff_plain;h=eb7fdc3cbd48b6258fb25419e4516f6735703102;p=tahoe-lafs%2Ftahoe-lafs.git fix alice_bob_test to check for proper deletion --- diff --git a/src/allmydata/test/test_magic_folder.py b/src/allmydata/test/test_magic_folder.py index 555900fe..38c8e98c 100644 --- a/src/allmydata/test/test_magic_folder.py +++ b/src/allmydata/test/test_magic_folder.py @@ -371,6 +371,10 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual #print "_check_version_in_local_db: %r has version %s" % (relpath_u, version) self.failUnlessEqual(version, expected_version) + def _check_file_gone(self, magicfolder, relpath_u): + path = os.path.join(magicfolder.uploader._local_path_u, relpath_u) + self.assertTrue(not os.path.exists(path)) + def test_alice_bob(self): alice_clock = task.Clock() bob_clock = task.Clock() @@ -431,6 +435,7 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual d.addCallback(lambda ign: self._check_version_in_local_db(self.bob_magicfolder, u"file1", 1)) d.addCallback(lambda ign: self._check_version_in_dmd(self.bob_magicfolder, u"file1", 1)) + d.addCallback(lambda ign: self._check_file_gone(self.bob_magicfolder, u"file1")) d.addCallback(_check_downloader_count, 'objects_failed', 0) d.addCallback(_check_downloader_count, 'objects_downloaded', 2)