Skip to content

Commit 5118c0b

Browse files
authored
test: fixing get_storage_class deprecated method in tests. (#36939)
1 parent b4897ed commit 5118c0b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cms/djangoapps/contentstore/tests/test_video_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
import requests
1313
from django.conf import settings
1414
from django.core.files.base import ContentFile
15-
from django.core.files.storage import get_storage_class
1615
from django.core.files.uploadedfile import UploadedFile
1716
from django.test.utils import override_settings
17+
from django.utils.module_loading import import_string
1818
from edxval.api import create_profile, create_video, get_course_video_image_url, update_video_image
1919
from storages.backends.s3boto3 import S3Boto3Storage
2020

@@ -390,7 +390,7 @@ def order_dict(self, dictionary):
390390
def test_video_backend(self):
391391
self.assertEqual(
392392
S3Boto3Storage,
393-
get_storage_class(
393+
import_string(
394394
'storages.backends.s3boto3.S3Boto3Storage',
395395
)(**settings.VIDEO_IMAGE_SETTINGS.get('STORAGE_KWARGS', {})).__class__
396396
)
@@ -401,7 +401,7 @@ def test_video_backend(self):
401401
{'bucket_name': 'test', 'default_acl': None, 'location': 'abc/def'}}
402402
)
403403
def test_boto3_backend_with_params(self):
404-
storage = get_storage_class(
404+
storage = import_string(
405405
settings.VIDEO_IMAGE_SETTINGS.get('STORAGE_CLASS', {})
406406
)(**settings.VIDEO_IMAGE_SETTINGS.get('STORAGE_KWARGS', {}))
407407

0 commit comments

Comments
 (0)