From: David Stainton Date: Wed, 9 Dec 2015 11:26:43 +0000 (+0200) Subject: Fix tests usage of umask X-Git-Url: https://git.rkrishnan.org/simplejson/components/(%5B%5E?a=commitdiff_plain;h=49dfffabb07a5a185b7f22e880f10c20f41b98df;p=tahoe-lafs%2Ftahoe-lafs.git Fix tests usage of umask --- diff --git a/src/allmydata/test/test_cli_magic_folder.py b/src/allmydata/test/test_cli_magic_folder.py index 866958e8..c69ee1e0 100644 --- a/src/allmydata/test/test_cli_magic_folder.py +++ b/src/allmydata/test/test_cli_magic_folder.py @@ -112,7 +112,7 @@ class MagicFolderCLITestMixin(CLITestMixin, GridTestMixin): def init_magicfolder(self, client_num, upload_dircap, collective_dircap, local_magic_dir, clock): dbfile = abspath_expanduser_unicode(u"magicfolderdb.sqlite", base=self.get_clientdir(i=client_num)) magicfolder = MagicFolder(self.get_client(client_num), upload_dircap, collective_dircap, local_magic_dir, - dbfile, pending_delay=0.2, clock=clock) + dbfile, 0077, pending_delay=0.2, clock=clock) magicfolder.downloader._turn_delay = 0 magicfolder.setServiceParent(self.get_client(client_num)) diff --git a/src/allmydata/test/test_magic_folder.py b/src/allmydata/test/test_magic_folder.py index f8401b85..4db001f1 100644 --- a/src/allmydata/test/test_magic_folder.py +++ b/src/allmydata/test/test_magic_folder.py @@ -1089,23 +1089,23 @@ class MockTest(MagicFolderTestMixin, unittest.TestCase): readonly_dircap = n.get_readonly_uri() self.shouldFail(AssertionError, 'nonexistent local.directory', 'there is no directory', - MagicFolder, client, upload_dircap, '', doesnotexist, magicfolderdb) + MagicFolder, client, upload_dircap, '', doesnotexist, magicfolderdb, 0077) self.shouldFail(AssertionError, 'non-directory local.directory', 'is not a directory', - MagicFolder, client, upload_dircap, '', not_a_dir, magicfolderdb) + MagicFolder, client, upload_dircap, '', not_a_dir, magicfolderdb, 0077) self.shouldFail(AssertionError, 'bad upload.dircap', 'does not refer to a directory', - MagicFolder, client, 'bad', '', errors_dir, magicfolderdb) + MagicFolder, client, 'bad', '', errors_dir, magicfolderdb, 0077) self.shouldFail(AssertionError, 'non-directory upload.dircap', 'does not refer to a directory', - MagicFolder, client, 'URI:LIT:foo', '', errors_dir, magicfolderdb) + MagicFolder, client, 'URI:LIT:foo', '', errors_dir, magicfolderdb, 0077) self.shouldFail(AssertionError, 'readonly upload.dircap', 'is not a writecap to a directory', - MagicFolder, client, readonly_dircap, '', errors_dir, magicfolderdb) + MagicFolder, client, readonly_dircap, '', errors_dir, magicfolderdb, 0077) self.shouldFail(AssertionError, 'collective dircap', 'is not a readonly cap to a directory', - MagicFolder, client, upload_dircap, upload_dircap, errors_dir, magicfolderdb) + MagicFolder, client, upload_dircap, upload_dircap, errors_dir, magicfolderdb, 0077) def _not_implemented(): raise NotImplementedError("blah") self.patch(magic_folder, 'get_inotify_module', _not_implemented) self.shouldFail(NotImplementedError, 'unsupported', 'blah', - MagicFolder, client, upload_dircap, '', errors_dir, magicfolderdb) + MagicFolder, client, upload_dircap, '', errors_dir, magicfolderdb, 0077) d.addCallback(_check_errors) return d