diff --git a/ecommerce/extensions/iap/api/v1/tests/test_utils.py b/ecommerce/extensions/iap/api/v1/tests/test_utils.py index 51e4eb86746..1968cd7b23e 100644 --- a/ecommerce/extensions/iap/api/v1/tests/test_utils.py +++ b/ecommerce/extensions/iap/api/v1/tests/test_utils.py @@ -225,8 +225,7 @@ def test_upload_screenshot_of_inapp_purchase(self, _): self.assertEqual(post_call.call_args[1]['headers'], headers) self.assertEqual(put_call.call_args[0][0], 'https://image-url.com') - img_headers = headers.copy() - img_headers['Content-Type'] = 'image/png' + img_headers = {'Content-Type': 'image/png'} self.assertEqual(put_call.call_args[1]['headers'], img_headers) img_patch_url = 'https://api.appstoreconnect.apple.com/v1/inAppPurchaseAppStoreReviewScreenshots/1234' diff --git a/ecommerce/extensions/iap/api/v1/utils.py b/ecommerce/extensions/iap/api/v1/utils.py index 918b5af005b..2f6947bc767 100644 --- a/ecommerce/extensions/iap/api/v1/utils.py +++ b/ecommerce/extensions/iap/api/v1/utils.py @@ -282,8 +282,7 @@ def upload_screenshot_of_inapp_purchase(in_app_purchase_id, headers): screenshot_id = response['data']['id'] url = response['data']['attributes']['uploadOperations'][0]['url'] with staticfiles_storage.open('images/mobile_ios_product_screenshot.png', 'rb') as image: - img_headers = headers.copy() - img_headers['Content-Type'] = 'image/png' + img_headers = {'Content-Type': 'image/png'} response = request_connect_store(url, headers=img_headers, data=image.read(), method='put') if response.status_code != 200: