def test_get_params_from_args_with_multiple_declarations(self):
        """test_get_params_from_args_with_multiple_declarations

        This tests the details of the auto-dict conversion, assuming it's enabled. Please
        see test_opt_in_dict_auto_convert for a test of detecting whether or not this
        functionality is enabled.
        """

        runner = RunnerType()
        runner.runner_parameters = {}

        action = Action()
        action.ref = "test.action"
        action.parameters = {
            "param_string": {"type": "string"},
            "param_array": {"type": "array"},
            "param_array_of_dicts": {"type": "array"},
        }

        subparser = mock.Mock()
        command = ActionRunCommand(action, self, subparser, name="test")

        mockarg = mock.Mock()
        mockarg.inherit_env = False
        mockarg.auto_dict = True
        mockarg.parameters = [
            "param_string=hoge",  # This value will be overwritten with the next declaration.
            "param_string=fuga",
            "param_array=foo",
            "param_array=bar",
            "param_array_of_dicts=foo:1,bar:2",
            "param_array_of_dicts=hoge:A,fuga:B",
        ]

        param = command._get_action_parameters_from_args(
            action=action, runner=runner, args=mockarg
        )

        # checks to accept multiple declaration only if the array type
        self.assertEqual(param["param_string"], "fuga")
        self.assertEqual(param["param_array"], ["foo", "bar"])
        self.assertEqual(
            param["param_array_of_dicts"],
            [{"foo": "1", "bar": "2"}, {"hoge": "A", "fuga": "B"}],
        )

        # set auto_dict back to default
        mockarg.auto_dict = False
test_get_params_from_args_with_multiple_declarations

        This tests the details of the auto-dict conversion, assuming it's enabled. Please
        see test_opt_in_dict_auto_convert for a test of detecting whether or not this
        functionality is enabled.
        
st2client/tests/unit/test_command_actionrun.py