コード例 #1
0
ファイル: test_client_json.py プロジェクト: marghoob/server
 def captureOutput(self, command):
     """
     Runs the specified client command, capturing the output written
     to stdout. This is returned as a string.
     """
     stdout = sys.stdout
     sys.stdout = StringIO.StringIO()
     try:
         cli.client_main(command.split())
         output = sys.stdout.getvalue()
     finally:
         sys.stdout.close()
         sys.stdout = stdout
     return output
コード例 #2
0
 def setUp(self):
     # initialize the client parser
     self.parser = StubArgumentParser(self)
     cli.client_main(self.parser)
コード例 #3
0
 def testCliNoInput(self):
     cli.client_main(self.parser)
コード例 #4
0
ファイル: test_cli.py プロジェクト: pashields/server
 def setUp(self):
     # initialize the client parser
     self.parser = StubArgumentParser(self)
     cli.client_main(self.parser)
コード例 #5
0
 def testCliNoInput(self):
     parser = StubArgumentParser(self)
     cli.client_main(parser)
     parser.assertParseArgsCountEquals(1)
     parser.assertHelpCountEquals(1)
コード例 #6
0
ファイル: test_cli.py プロジェクト: hershman/server
 def testCliNoInput(self):
     cli.client_main(self.parser)