Ejemplo n.º 1
0
    def testCommandErrorInstanciation(self):
        commandError = CommandError(None)
        commandError.requestInputString = "-c"
        commandError.parsedParmData[
            commandError.
            COMMAND_ERROR_TYPE_KEY] = commandError.COMMAND_ERROR_TYPE_PARTIAL_REQUEST
        commandError.parsedParmData[
            commandError.
            COMMAND_ERROR_MSG_KEY] = commandError.CRYPTO_SYMBOL_MISSING_MSG

        resultData = commandError.execute()
        self.assertEqual(
            "ERROR - invalid partial request -c: crypto symbol missing.",
            resultData.getValue(ResultData.RESULT_KEY_ERROR_MSG))
Ejemplo n.º 2
0
 def testCommandErrorInstanciation(self):
     commandError = CommandError(None)
     commandError.rawParmData = "invalid user input"
     commandError.parsedParmData = [commandError.CRYPTO_SYMBOL_MISSING_MSG]
     self.assertEquals("Error in input invalid user input: crypto symbol missing !", commandError.execute())