Make sure the repository response_object is json serializable with images

If images had been pushed to a repository, they would be included in the
response object, and the json encoder could not serialize the Image class.

Since they are not included in the boto response, I just deleted the images
field from the response object for Repositories.

I also found a duplicate test in the ecr class, so I removed one of them.
This commit is contained in:
William Richard 2017-06-20 15:32:32 -04:00
commit b67e10d5c9
No known key found for this signature in database
GPG key ID: F7F8BA4DDBE1ABED
2 changed files with 22 additions and 21 deletions

View file

@ -58,7 +58,7 @@ class Repository(BaseObject):
response_object['repositoryName'] = self.name
response_object['repositoryUri'] = self.uri
# response_object['createdAt'] = self.created
del response_object['arn'], response_object['name']
del response_object['arn'], response_object['name'], response_object['images']
return response_object
@classmethod