Ministack: Free, open-source local AWS emulator - 60+ services, Terraform compatible, real databases. Free forever. MIT licensed.
Python awsaws-emulatoraws-localaws-sdkdevtoolsdockerdynamodbec2emulatorlambdalocalstacklocalstack-alternativeministackmock-awsopen-sourcepythons3sqsterraform
fix(iot): merge conflicts
Nahuel990ebe5b02fa9c0
diff --git a/ministack/services/iot.py b/ministack/services/iot.pyindex 4a272204..ccacf48e 100644--- a/ministack/services/iot.py+++ b/ministack/services/iot.py@@ -5028,7 +5028,9 @@ def _set_topic_rule_disabled(name: str, disabled: bool) -> tuple:)rule = _topic_rules.get(name)if rule is None:- return _error_not_found("Rule", name)+ return error_response_json(+ "UnauthorizedException", f"Access to topic rule '{name}' was denied", 401+ )rule["ruleDisabled"] = disabledreturn 200, {}, b""diff --git a/tests/test_iot.py b/tests/test_iot.pyindex 9f77985e..0d97ad79 100644--- a/tests/test_iot.py+++ b/tests/test_iot.py@@ -2623,7 +2623,9 @@ def test_iot_enable_disable_topic_rule_refusals(iot_client):for call in (iot_client.enable_topic_rule, iot_client.disable_topic_rule):with pytest.raises(ClientError) as ei:call(ruleName=missing)- assert ei.value.response["Error"]["Code"] == "ResourceNotFoundException"+ err = ei.value.response+ assert (err["ResponseMetadata"]["HTTPStatusCode"], err["Error"]["Code"], err["Error"]["Message"]) == (+ 401, "UnauthorizedException", f"Access to topic rule '{missing}' was denied")with pytest.raises(ClientError) as ei:call(ruleName="bad-name")assert ei.value.response["Error"]["Code"] == "InvalidRequestException"