mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-02 03:06:41 +00:00
Fix Alice Bob mock test
This commit is contained in:
parent
4a798883be
commit
8cefb7a680
@ -328,9 +328,11 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual
|
|||||||
|
|
||||||
def Alice_write_a_file(result):
|
def Alice_write_a_file(result):
|
||||||
print "Alice writes a file\n"
|
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.")
|
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)
|
d.addCallback(Alice_write_a_file)
|
||||||
|
|
||||||
def Alice_wait_for_upload(result):
|
def Alice_wait_for_upload(result):
|
||||||
@ -362,7 +364,8 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual
|
|||||||
def Alice_delete_file(result):
|
def Alice_delete_file(result):
|
||||||
print "Alice deletes the file!\n"
|
print "Alice deletes the file!\n"
|
||||||
os.unlink(self.file_path)
|
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
|
return None
|
||||||
d.addCallback(Alice_delete_file)
|
d.addCallback(Alice_delete_file)
|
||||||
d.addCallback(Alice_wait_for_upload)
|
d.addCallback(Alice_wait_for_upload)
|
||||||
|
Loading…
Reference in New Issue
Block a user