From 7479beb29d39a30f62031659c6e1848e662d6dbf Mon Sep 17 00:00:00 2001 From: Daniel Wong Date: Wed, 6 Aug 2025 13:22:07 -0600 Subject: [PATCH] fix: adjust storage class path to use SOFTWARE_SECURE settings --- lms/djangoapps/verify_student/models.py | 2 +- lms/djangoapps/verify_student/tests/test_models.py | 4 ++-- lms/djangoapps/verify_student/tests/test_views.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index f3b49329b8..cee18ca8d3 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -928,7 +928,7 @@ class SoftwareSecurePhotoVerification(PhotoVerification): return resolve_storage_backend( storage_key="verify_student", legacy_setting_key="VERIFY_STUDENT", - legacy_sec_setting_keys=["STORAGE_CLASS"], + legacy_sec_setting_keys=["SOFTWARE_SECURE", "STORAGE_CLASS"], options=storage_kwargs ) diff --git a/lms/djangoapps/verify_student/tests/test_models.py b/lms/djangoapps/verify_student/tests/test_models.py index 3ac603eaab..fb94b28a3c 100644 --- a/lms/djangoapps/verify_student/tests/test_models.py +++ b/lms/djangoapps/verify_student/tests/test_models.py @@ -45,9 +45,9 @@ iwIDAQAB "AWS_SECRET_KEY": "FAKESECRETKEY", "S3_BUCKET": "fake-bucket", "CERT_VERIFICATION_PATH": False, + "STORAGE_CLASS": "storages.backends.s3boto3.S3Boto3Storage" }, - "DAYS_GOOD_FOR": 10, - "STORAGE_CLASS": "storages.backends.s3boto3.S3Boto3Storage" + "DAYS_GOOD_FOR": 10 } diff --git a/lms/djangoapps/verify_student/tests/test_views.py b/lms/djangoapps/verify_student/tests/test_views.py index d883a24a19..f3c5fe46ea 100644 --- a/lms/djangoapps/verify_student/tests/test_views.py +++ b/lms/djangoapps/verify_student/tests/test_views.py @@ -1299,9 +1299,9 @@ class TestSubmitPhotosForVerification(MockS3Boto3Mixin, TestVerificationBase): "AWS_SECRET_KEY": "fc595fc657c04437bb23495d8fe64881", "S3_BUCKET": "test.example.com", "CERT_VERIFICATION_PATH": False, + "STORAGE_CLASS": "storages.backends.s3boto3.S3Boto3Storage", }, "DAYS_GOOD_FOR": 10, - "STORAGE_CLASS": "storages.backends.s3boto3.S3Boto3Storage" }) @httpretty.activate def test_submit_photos_for_reverification(self): @@ -1854,9 +1854,9 @@ class TestReverifyView(TestVerificationBase): "AWS_ACCESS_KEY": "c987c7efe35c403caa821f7328febfa1", "AWS_SECRET_KEY": "fc595fc657c04437bb23495d8fe64881", "CERT_VERIFICATION_PATH": False, + "STORAGE_CLASS": 'storages.backends.s3boto3.S3Boto3Storage', }, "DAYS_GOOD_FOR": 10, - "STORAGE_CLASS": 'storages.backends.s3boto3.S3Boto3Storage', "STORAGE_KWARGS": { 'bucket': 'test-idv', }, @@ -1918,9 +1918,9 @@ class TestPhotoURLView(TestVerificationBase): "AWS_SECRET_KEY": "fc595fc657c04437bb23495d8fe64881", "S3_BUCKET": "test-idv", "CERT_VERIFICATION_PATH": False, + "STORAGE_CLASS": 'storages.backends.s3boto3.S3Boto3Storage', }, "DAYS_GOOD_FOR": 10, - "STORAGE_CLASS": 'storages.backends.s3boto3.S3Boto3Storage', "STORAGE_KWARGS": { 'bucket': 'test-idv', },