feat!: upgrading django-storages to 1.13.2 (#33301)
* feat!: upgrading `django-storages` to `1.13.2`
This commit is contained in:
@@ -378,6 +378,15 @@ class S3Boto3TestCase(TestCase):
|
||||
self.storage = S3Boto3Storage()
|
||||
self.storage._connections.connection = MagicMock() # pylint: disable=protected-access
|
||||
|
||||
def order_dict(self, dictionary):
|
||||
"""
|
||||
sorting dict key:values for tests cases.
|
||||
"""
|
||||
sorted_key_values = sorted(dictionary.items())
|
||||
dictionary.clear()
|
||||
dictionary.update(sorted_key_values)
|
||||
return dictionary
|
||||
|
||||
def test_video_backend(self):
|
||||
self.assertEqual(
|
||||
S3Boto3Storage,
|
||||
@@ -416,9 +425,10 @@ class S3Boto3TestCase(TestCase):
|
||||
obj = storage.bucket.Object.return_value
|
||||
obj.upload_fileobj.assert_called_with(
|
||||
content,
|
||||
ExtraArgs={
|
||||
ExtraArgs=self.order_dict({
|
||||
'ContentType': 'text/plain',
|
||||
}
|
||||
}),
|
||||
Config=storage._transfer_config # pylint: disable=protected-access
|
||||
)
|
||||
|
||||
@override_settings(AWS_DEFAULT_ACL='public-read')
|
||||
@@ -452,7 +462,8 @@ class S3Boto3TestCase(TestCase):
|
||||
|
||||
obj.upload_fileobj.assert_called_with(
|
||||
content,
|
||||
ExtraArgs=ExtraArgs
|
||||
ExtraArgs=self.order_dict(ExtraArgs),
|
||||
Config=storage._transfer_config # pylint: disable=protected-access
|
||||
)
|
||||
|
||||
@ddt.data('public-read', 'private')
|
||||
@@ -473,7 +484,8 @@ class S3Boto3TestCase(TestCase):
|
||||
obj = storage.bucket.Object.return_value
|
||||
obj.upload_fileobj.assert_called_with(
|
||||
content,
|
||||
ExtraArgs={
|
||||
ExtraArgs=self.order_dict({
|
||||
'ContentType': 'text/plain',
|
||||
}
|
||||
}),
|
||||
Config=storage._transfer_config # pylint: disable=protected-access
|
||||
)
|
||||
|
||||
@@ -477,6 +477,7 @@ elif AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY:
|
||||
else:
|
||||
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
|
||||
|
||||
|
||||
# If there is a database called 'read_replica', you can use the use_read_replica_if_available
|
||||
# function in util/query.py, which is useful for very large database reads
|
||||
DATABASES = AUTH_TOKENS.get('DATABASES', DATABASES)
|
||||
|
||||
@@ -21,7 +21,7 @@ celery>=5.2.2,<6.0.0
|
||||
click>=8.0,<9.0
|
||||
|
||||
# django-storages version upgrade
|
||||
django-storages==1.12.3
|
||||
django-storages==1.13.2
|
||||
|
||||
|
||||
# The team that owns this package will manually bump this package rather than having it pulled in automatically.
|
||||
@@ -131,6 +131,6 @@ openedx-events<8.6.0 # Open edX Events from Hooks Extension Framew
|
||||
openedx-learning==0.1.6
|
||||
|
||||
# lti-consumer-xblock 9.6.2 contains a breaking change that makes
|
||||
# existing custom parameter configurations unusable.
|
||||
# existing custom parameter configurations unusable.
|
||||
# https://github.com/openedx/xblock-lti-consumer/issues/410 has been opened to track a fix
|
||||
lti-consumer-xblock==9.6.1
|
||||
|
||||
@@ -357,7 +357,7 @@ django-statici18n==2.4.0
|
||||
# -r requirements/edx/kernel.in
|
||||
# lti-consumer-xblock
|
||||
# xblock-drag-and-drop-v2
|
||||
django-storages==1.12.3
|
||||
django-storages==1.13.2
|
||||
# via
|
||||
# -c requirements/edx/../constraints.txt
|
||||
# -r requirements/edx/kernel.in
|
||||
|
||||
@@ -571,7 +571,7 @@ django-statici18n==2.4.0
|
||||
# -r requirements/edx/testing.txt
|
||||
# lti-consumer-xblock
|
||||
# xblock-drag-and-drop-v2
|
||||
django-storages==1.12.3
|
||||
django-storages==1.13.2
|
||||
# via
|
||||
# -c requirements/edx/../constraints.txt
|
||||
# -r requirements/edx/doc.txt
|
||||
|
||||
@@ -420,7 +420,7 @@ django-statici18n==2.4.0
|
||||
# -r requirements/edx/base.txt
|
||||
# lti-consumer-xblock
|
||||
# xblock-drag-and-drop-v2
|
||||
django-storages==1.12.3
|
||||
django-storages==1.13.2
|
||||
# via
|
||||
# -c requirements/edx/../constraints.txt
|
||||
# -r requirements/edx/base.txt
|
||||
|
||||
@@ -453,7 +453,7 @@ django-statici18n==2.4.0
|
||||
# -r requirements/edx/base.txt
|
||||
# lti-consumer-xblock
|
||||
# xblock-drag-and-drop-v2
|
||||
django-storages==1.12.3
|
||||
django-storages==1.13.2
|
||||
# via
|
||||
# -c requirements/edx/../constraints.txt
|
||||
# -r requirements/edx/base.txt
|
||||
|
||||
Reference in New Issue
Block a user