Ejemplo n.º 1
0
    def test_should_convert_dictionary_to_object(self):
        values = {'command_input': {'command': 'any_command',
                                    'arguments': ['any_arguments'],
                                    'stdin': 'any_stdin'},
                  'expected': True}

        actual = Execution.from_dictionary(values)

        self.assertEqual('any_command', actual.command_input.command)
        self.assertEqual(['any_arguments'], actual.command_input.arguments)
        self.assertEqual('any_stdin', actual.command_input.stdin)
        self.assertEqual(True, actual.expected)
Ejemplo n.º 2
0
def deserialize_executions (filename):
    """
        loads the given json file and returns a list of executions.
    """
    executions = _load_json_file(filename)
    return list(map(lambda e: Execution.from_dictionary(e), executions))
Ejemplo n.º 3
0
def deserialize_executions(filename):
    """
        loads the given json file and returns a list of executions.
    """
    executions = _load_json_file(filename)
    return list(map(lambda e: Execution.from_dictionary(e), executions))