From: Daira Hopwood Date: Tue, 11 Aug 2015 17:24:53 +0000 (+0100) Subject: Work in progress to fix tests. X-Git-Url: https://git.rkrishnan.org/listings/module-simplejson.scanner.html?a=commitdiff_plain;h=refs%2Fheads%2F2227.format-mutable.0;p=tahoe-lafs%2Ftahoe-lafs.git Work in progress to fix tests. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/test/test_cli.py b/src/allmydata/test/test_cli.py index b59a2b1b..d3d85463 100644 --- a/src/allmydata/test/test_cli.py +++ b/src/allmydata/test/test_cli.py @@ -934,10 +934,10 @@ class Mkdir(GridTestMixin, CLITestMixin, unittest.TestCase): 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) @@ -950,7 +950,8 @@ class Mkdir(GridTestMixin, CLITestMixin, unittest.TestCase): 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") diff --git a/src/allmydata/test/test_cli_create_alias.py b/src/allmydata/test/test_cli_create_alias.py index ae3cd5bd..7b7d5bc0 100644 --- a/src/allmydata/test/test_cli_create_alias.py +++ b/src/allmydata/test/test_cli_create_alias.py @@ -163,7 +163,8 @@ class CreateAlias(GridTestMixin, CLITestMixin, unittest.TestCase): 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 + ":"))