]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Fix Alice Bob mock test
authorDavid Stainton <dstainton415@gmail.com>
Mon, 6 Jul 2015 20:10:20 +0000 (13:10 -0700)
committerDaira Hopwood <daira@jacaranda.org>
Mon, 20 Jul 2015 23:42:35 +0000 (00:42 +0100)
src/allmydata/test/test_magic_folder.py

index bfd2936222c38fd1e0bd25c509f94bbd27b820c5..f33d5f94eac808de64bbd38e01417a283ae8edae 100644 (file)
@@ -328,9 +328,11 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual
 
         def Alice_write_a_file(result):
             print "Alice writes a file\n"
-            self.file_path = os.path.join(self.alice_magicfolder._local_dir, "file1")
+            self.file_path = abspath_expanduser_unicode(u"file1", base=self.alice_magicfolder._local_dir)
             fileutil.write(self.file_path, "meow, meow meow. meow? meow meow! meow.")
-            # XXX fix me --> self.notify(file_path, self.inotify.IN_CLOSE_WRITE)
+            self.magicfolder = self.alice_magicfolder
+            self.notify(to_filepath(self.file_path), self.inotify.IN_CLOSE_WRITE)
+
         d.addCallback(Alice_write_a_file)
 
         def Alice_wait_for_upload(result):
@@ -362,7 +364,8 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual
         def Alice_delete_file(result):
             print "Alice deletes the file!\n"
             os.unlink(self.file_path)
-            self.notify(self.file_path, self.inotify.IN_DELETE)
+            self.notify(to_filepath(self.file_path), self.inotify.IN_DELETE)
+
             return None
         d.addCallback(Alice_delete_file)
         d.addCallback(Alice_wait_for_upload)