Fix mimetype handling in registry tests

This commit is contained in:
Joseph Schorr 2018-11-14 08:51:01 +02:00
parent 7a794e29c0
commit 3b4002877a
2 changed files with 3 additions and 3 deletions

View file

@ -181,7 +181,7 @@ class V2Protocol(RegistryProtocol):
headers = { headers = {
'Authorization': 'Bearer ' + token, 'Authorization': 'Bearer ' + token,
'Accept': ','.join(options.accept_mimetypes or []), 'Accept': ','.join(options.accept_mimetypes) if options.accept_mimetypes else '*/*',
} }
# Push all blobs. # Push all blobs.
@ -285,7 +285,7 @@ class V2Protocol(RegistryProtocol):
headers = { headers = {
'Authorization': 'Bearer ' + token, 'Authorization': 'Bearer ' + token,
'Accept': ','.join(options.accept_mimetypes or []), 'Accept': ','.join(options.accept_mimetypes) if options.accept_mimetypes else '*/*',
} }
# Build fake manifests. # Build fake manifests.

View file

@ -68,7 +68,7 @@ class ProtocolOptions(object):
self.chunks_for_upload = None self.chunks_for_upload = None
self.skip_head_checks = False self.skip_head_checks = False
self.manifest_content_type = None self.manifest_content_type = None
self.accept_mimetypes = '*/*' self.accept_mimetypes = None
self.mount_blobs = None self.mount_blobs = None
self.push_by_manifest_digest = False self.push_by_manifest_digest = False