Try to improve the failure mode

This commit is contained in:
Jean-Paul Calderone 2020-11-19 08:50:44 -05:00
parent cd1cc1f2cc
commit d727ae4a86

View File

@ -247,6 +247,12 @@ class TahoeLAFSSiteTests(SyncTestCase):
tempdir.chmod(0o550)
with self.assertRaises(OSError) as ctx:
request.gotLength(request_body_size)
raise Exception(
"OSError not raised, instead tempdir.children() = {}".format(
tempdir.children(),
),
)
self.assertThat(
ctx.exception.errno,
Equals(EACCES),