mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-13 22:03:04 +00:00
Merge pull request #544 from tahoe-lafs/2967.alias-test_create
Fix CreateAlias.test_create This test didn't previously run completely due to a bug in the test itself. Fixes: ticket:2967
This commit is contained in:
commit
baa0a46cd4
1
newsfragments/2967.other
Normal file
1
newsfragments/2967.other
Normal file
@ -0,0 +1 @@
|
||||
A bug in the test suite for the create-alias command has been fixed.
|
@ -1,3 +1,4 @@
|
||||
from StringIO import StringIO
|
||||
import os.path
|
||||
from twisted.trial import unittest
|
||||
import urllib
|
||||
@ -17,7 +18,10 @@ class CreateAlias(GridTestMixin, CLITestMixin, unittest.TestCase):
|
||||
o.parseOptions(["--node-directory", self.get_clientdir(), "webopen"]
|
||||
+ list(args))
|
||||
urls = []
|
||||
rc = cli.webopen(o, urls.append)
|
||||
o.subOptions.stdout = StringIO()
|
||||
o.subOptions.stderr = StringIO()
|
||||
o.subOptions.stdin = StringIO()
|
||||
rc = cli.webopen(o.subOptions, urls.append)
|
||||
self.failUnlessReallyEqual(rc, 0)
|
||||
self.failUnlessReallyEqual(len(urls), 1)
|
||||
self.failUnlessReallyEqual(urls[0], expected_url)
|
||||
@ -145,6 +149,7 @@ class CreateAlias(GridTestMixin, CLITestMixin, unittest.TestCase):
|
||||
self.failUnless("un-corrupted2" in aliases)
|
||||
self.failUnless(aliases["un-corrupted2"].startswith("URI:DIR2:"))
|
||||
d.addCallback(_check_not_corrupted)
|
||||
return d
|
||||
|
||||
def test_create_unicode(self):
|
||||
self.basedir = "cli/CreateAlias/create_unicode"
|
||||
@ -205,5 +210,3 @@ class CreateAlias(GridTestMixin, CLITestMixin, unittest.TestCase):
|
||||
return d
|
||||
|
||||
# TODO: test list-aliases, including Unicode
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user