feat: update events remove_targets API response (#3340)
* feat: update events remove_targets API response * test: add missing test for expected exception
This commit is contained in:
parent
3bc18455a2
commit
195ba81c56
3 changed files with 25 additions and 5 deletions
|
|
@ -368,9 +368,12 @@ class EventsBackend(BaseBackend):
|
|||
|
||||
if rule:
|
||||
rule.remove_targets(ids)
|
||||
return True
|
||||
|
||||
return False
|
||||
return {"FailedEntries": [], "FailedEntryCount": 0}
|
||||
else:
|
||||
raise JsonRESTError(
|
||||
"ResourceNotFoundException",
|
||||
"An entity that you specified does not exist",
|
||||
)
|
||||
|
||||
def test_event_pattern(self):
|
||||
raise NotImplementedError()
|
||||
|
|
|
|||
|
|
@ -238,7 +238,10 @@ class EventsHandler(BaseResponse):
|
|||
"ResourceNotFoundException", "Rule " + rule_name + " does not exist."
|
||||
)
|
||||
|
||||
return "", self.response_headers
|
||||
return (
|
||||
json.dumps({"FailedEntryCount": 0, "FailedEntries": []}),
|
||||
self.response_headers,
|
||||
)
|
||||
|
||||
def test_event_pattern(self):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue