test_dirnode: improve coverage of not-mutable-error a bit

This commit is contained in:
Brian Warner 2008-05-08 16:53:35 -07:00
parent 411f578c19
commit 7323ced8e4

View File

@ -138,12 +138,16 @@ class Dirnode(unittest.TestCase, testutil.ShouldFailMixin, testutil.StallMixin):
ro_dn.set_uri, u"newchild", fileuri) ro_dn.set_uri, u"newchild", fileuri)
self.shouldFail(dirnode.NotMutableError, "set_uri ro", None, self.shouldFail(dirnode.NotMutableError, "set_uri ro", None,
ro_dn.set_node, u"newchild", filenode) ro_dn.set_node, u"newchild", filenode)
self.shouldFail(dirnode.NotMutableError, "set_nodes ro", None,
ro_dn.set_nodes, [ (u"newchild", filenode) ])
self.shouldFail(dirnode.NotMutableError, "set_uri ro", None, self.shouldFail(dirnode.NotMutableError, "set_uri ro", None,
ro_dn.add_file, u"newchild", uploadable) ro_dn.add_file, u"newchild", uploadable)
self.shouldFail(dirnode.NotMutableError, "set_uri ro", None, self.shouldFail(dirnode.NotMutableError, "set_uri ro", None,
ro_dn.delete, u"child") ro_dn.delete, u"child")
self.shouldFail(dirnode.NotMutableError, "set_uri ro", None, self.shouldFail(dirnode.NotMutableError, "set_uri ro", None,
ro_dn.create_empty_directory, u"newchild") ro_dn.create_empty_directory, u"newchild")
self.shouldFail(dirnode.NotMutableError, "set_metadata_for ro", None,
ro_dn.set_metadata_for, u"child", {})
self.shouldFail(dirnode.NotMutableError, "set_uri ro", None, self.shouldFail(dirnode.NotMutableError, "set_uri ro", None,
ro_dn.move_child_to, u"child", rw_dn) ro_dn.move_child_to, u"child", rw_dn)
self.shouldFail(dirnode.NotMutableError, "set_uri ro", None, self.shouldFail(dirnode.NotMutableError, "set_uri ro", None,