from ..testcase import TestCase

class TestHelp(TestCase):

    def test_get_function_list(self):
        h = self.geosupport.help()

        self.assertTrue("1" in h)
        self.assertTrue("bbl" in h)

    def test_function_help(self):
        h = self.geosupport.help("bbl")

        self.assertTrue("Function BL processes" in h)
        self.assertTrue("Input: Borough" in h)
        self.assertTrue("Output: Tax lot" in h)
        self.assertTrue("Modes: regular, extended" in h)
        self.assertTrue("Mode Switch" in h)

    def test_invalid_function_help(self):
        h = self.geosupport.help("fake")

        self.assertEqual(h, "Function 'fake' does not exist.")

@@ -1,8 +1,30 @@
+import io%0Aimport sys%0A%0A
 from ..t
@@ -146,16 +146,37 @@
 rt.help(
+return_as_string=True
 )%0A%0A     
@@ -313,16 +313,39 @@
 lp(%22bbl%22
+, return_as_string=True
 )%0A%0A     
@@ -671,16 +671,39 @@
 p(%22fake%22
+, return_as_string=True
 )%0A%0A     
@@ -760,8 +760,240 @@
 xist.%22)%0A
+%0A    def test_print(self):%0A        h = io.StringIO()%0A        sys.stdout = h%0A%0A        o = self.geosupport.help()%0A%0A        sys.stdout = sys.__stdout__%0A%0A        self.assertTrue(%22bbl%22 in h.getvalue())%0A        self.assertTrue(o is None)%0A

fix help unit tests