Teach join twice test to test for proper stdout and stderr values
authorDavid Stainton <dstainton415@gmail.com>
Wed, 9 Dec 2015 11:12:33 +0000 (13:12 +0200)
committerDaira Hopwood <daira@jacaranda.org>
Fri, 5 Feb 2016 21:59:38 +0000 (21:59 +0000)
src/allmydata/test/test_cli_magic_folder.py

index eb171c0cafc38d7ed731b06cbb2339f0e3d2cb39..58ef6debcbf28feedc3f15654685d5427a697b21 100644 (file)
@@ -276,6 +276,11 @@ class CreateMagicFolder(MagicFolderCLITestMixin, unittest.TestCase):
         d.addCallback(join_again)
         def get_results(result):
             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)
         d.addCallback(get_results)
         return d