mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 02:01:31 +00:00
test for EnvironmentError that's not ENOENT
This commit is contained in:
parent
ab812ca75f
commit
2e2bdf1ea1
@ -38,6 +38,22 @@ class Basic(testutil.ReallyEqualMixin, testutil.NonASCIIPathMixin, unittest.Test
|
||||
BASECONFIG)
|
||||
return client.create_client(basedir)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_unreadable_introducers(self):
|
||||
"""
|
||||
An error when private/introducers.yaml is unreadable (but exists)
|
||||
"""
|
||||
basedir = "test_client.Basic.test_unreadable_introduers"
|
||||
os.mkdir(basedir, 0o700)
|
||||
os.mkdir(os.path.join(basedir, 'private'), 0o700)
|
||||
intro_fname = os.path.join(basedir, 'private', 'introducers.yaml')
|
||||
with open(intro_fname, 'w') as f:
|
||||
f.write("---\n")
|
||||
os.chmod(intro_fname, 0o000)
|
||||
|
||||
with self.assertRaises(EnvironmentError):
|
||||
yield client.create_client(basedir)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_comment(self):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user