예제 #1
0
 def test_process_without_json(self):
     commandLine = CommandLine()
     request = RequestMock()
     self.assertFalse(commandLine.process(request))
     self.assertEqual(commandLine.error, 400)
예제 #2
0
def cli():
    command_line = CommandLine()
    if command_line.process(request):
        return jsonify(command_line.result)
    else:
        abort(command_line.error)