Teach join twice test to test for proper stdout and stderr values

This commit is contained in:
David Stainton 2015-12-09 13:12:33 +02:00 committed by Brian Warner
parent 74ad656e39
commit 3074b687be

View File

@ -276,6 +276,11 @@ class CreateMagicFolder(MagicFolderCLITestMixin, unittest.TestCase):
d.addCallback(join_again) d.addCallback(join_again)
def get_results(result): def get_results(result):
code = result[0] code = result[0]
stdout = result[1]
stderr = result[2]
self.failUnlessEqual(stdout, "")
self.failUnlessEqual(stderr, "\nThis client has already joined a magic folder."
"\nUse the 'tahoe magic-folder leave' command first.\n\n")
self.failIfEqual(code, 0) self.failIfEqual(code, 0)
d.addCallback(get_results) d.addCallback(get_results)
return d return d