self.basedir = os.path.dirname(self.mktemp())
self.set_up_grid()
d = self.do_cli("create-alias", "tahoe")
- def _check((rc, out, err), st):
- self.failUnlessReallyEqual(rc, 0)
- self.failUnlessReallyEqual(err, "")
- self.failUnlessIn(st, out)
+ def _check((rc, out, err), st, what):
+ self.failUnlessReallyEqual(rc, 0, what)
+ self.failUnlessReallyEqual(err, "", what)
+ self.failUnlessIn(st, out, what)
return out
def _mkdir(ign, mutable_type, uri_prefix, dirname):
d2 = self.do_cli("mkdir", "--format="+mutable_type, dirname)
d2.addCallback(lambda ign: self.do_cli("ls", "--json", dirname))
d2.addCallback(_check, uri_prefix)
d2.addCallback(lambda ign: self.do_cli("ls", "--json", self._filecap))
- d2.addCallback(_check, '"format": "%s"' % (mutable_type.upper(),))
+ d2.addCallback(_check, '"format": "%s"' % (mutable_type.upper(),),
+ (mutable_type, uri_prefix, dirname))
return d2
d.addCallback(_mkdir, "sdmf", "URI:DIR2", "tahoe:foo")
self.failUnlessIn("Alias %s created" % quote_output(u"\u00E9tudes"), out)
aliases = get_aliases(self.get_clientdir())
- self.failUnless(aliases[u"\u00E9tudes"].startswith("URI:DIR2:"))
+ etudes_alias = aliases[u"\u00E9tudes"]
+ self.failUnless(etudes_alias.startswith("URI:DIR2-MDMF:"), etudes_alias)
d.addCallback(_check_create_unicode)
d.addCallback(lambda res: self.do_cli("ls", etudes_arg + ":"))