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:
Giovanni Torres 2020-09-29 06:51:17 -04:00 committed by GitHub
commit 195ba81c56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 5 deletions

View file

@ -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()

View file

@ -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