make test_at_cmd_string_extended_with_params_when_additional_params_in_execute_mode_provided failing on kwargs order
@@ -39,13 +39,13 @@ def test_at_cmd_string_extended_with_operation_sign_when_instantiated_in_no_defa
assert at_cmd_test_class(operation=cmd_mode).command_string == expected_cmd_string
-def test_at_cmd_string_extended_with_params_when_additional_kwargs_in_execute_mode_provided():
+def test_at_cmd_string_extended_with_params_when_additional_params_in_execute_mode_provided():
from moler.cmd.at.at import AtCmd
class AtCmdWithArgs(AtCmd):
- def __init__(self, connection=None, operation="execute", context_id=None, option=None):
+ def __init__(self, connection=None, operation="execute", context_id=None, option=None, action=''):
super(AtCmdWithArgs, self).__init__(connection, operation)
- self.set_at_command_string(command_base_string="AT+CMD", context_id=context_id, option=option)
+ self.set_at_command_string(command_base_string="AT+CMD", context_id=context_id, option=option, action=action)
def parse_command_output(self):
self.set_result("result")
@@ -56,8 +56,8 @@ def test_at_cmd_string_extended_with_params_when_additional_kwargs_in_execute_mo
at_cmd = AtCmdWithArgs(context_id=5)
assert at_cmd.command_string == "AT+CMD=5"
- at_cmd = AtCmdWithArgs(context_id=2, option="off")
- assert at_cmd.command_string == "AT+CMD=2,off"
+ at_cmd = AtCmdWithArgs(context_id=2, option="off", action='reset')
+ assert at_cmd.command_string == "AT+CMD=2,off,reset"
def test_calling_at_cmd_raises_AtCommandFailure_when_regular_ERROR_in_at_cmd_output_occurred(buffer_connection, at_cmd_test_class):
