Convert custom storage subclasses into mixins so that we can store to either the filesystem or S3

This commit is contained in:
Calen Pennington
2019-12-18 14:14:12 -05:00
parent 0ee1c2f05a
commit 151b309225
12 changed files with 62 additions and 39 deletions

View File

@@ -84,7 +84,11 @@ class LocalFSReportStoreTestCase(ReportStoreTestMixin, TestReportMixin, SimpleTe
return ReportStore.from_config(config_name='GRADES_DOWNLOAD')
@patch.dict(settings.GRADES_DOWNLOAD, {'STORAGE_TYPE': 's3'})
@patch.dict(settings.GRADES_DOWNLOAD, {
'STORAGE_TYPE': 's3',
# Strip the leading `/`, because boto doesn't want it
'ROOT_PATH': settings.GRADES_DOWNLOAD['ROOT_PATH'].lstrip('/')
})
class S3ReportStoreTestCase(MockS3Mixin, ReportStoreTestMixin, TestReportMixin, SimpleTestCase):
"""
Test the old S3ReportStore configuration.