def test_delete_udf_with_children(self):
        """Test delete_udf method."""
        udf = self.gw.make_udf('~/path/name')
        vgw = ReadWriteVolumeGateway(self.user, udf=udf)
        a_dir = vgw.make_subdirectory(vgw.root_id, 'subdir')
        vgw.make_file(a_dir.id, 'file')
        self.gw.delete_udf(udf.id)
        self.assertRaises(errors.DoesNotExist, self.gw.get_udf, udf.id)