Causes get_server_certificate to fail correctly

When no certificate with the name exists, the API should return a 404
(NoSuchEntity).
This commit is contained in:
Michael Barrett 2016-08-14 17:40:39 -07:00
commit 4bfbcf4d03
2 changed files with 12 additions and 0 deletions

View file

@ -318,6 +318,10 @@ class IAMBackend(BaseBackend):
if name == cert.cert_name:
return cert
raise IAMNotFoundException(
"The Server Certificate with name {0} cannot be "
"found.".format(name))
def create_group(self, group_name, path='/'):
if group_name in self.groups:
raise IAMConflictException("Group {0} already exists".format(group_name))