refactor: upgrade django=2.2.23. Fileupload issue fixed.

This commit is contained in:
Awais Qureshi
2021-05-17 14:59:25 +05:00
parent b62d7d45fa
commit 5c73e5dd86

View File

@@ -23,7 +23,7 @@ from lms.djangoapps.badges.models import (
validate_badge_image
)
from lms.djangoapps.badges.tests.factories import BadgeAssertionFactory, BadgeClassFactory, RandomBadgeClassFactory
from lms.djangoapps.certificates.tests.test_models import TEST_DATA_ROOT
from lms.djangoapps.certificates.tests.test_models import TEST_DATA_ROOT, TEST_DATA_DIR
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory
@@ -32,7 +32,7 @@ def get_image(name):
"""
Get one of the test images from the test data directory.
"""
return ImageFile(open(TEST_DATA_DIR / 'badges' / name + '.png', mode='rb')) # lint-amnesty, pylint: disable=bad-option-value, open-builtin
return ImageFile(open(f'{TEST_DATA_DIR}/badges/{name}.png', mode='rb')) # lint-amnesty, pylint: disable=bad-option-value, open-builtin
@override_settings(MEDIA_ROOT=TEST_DATA_ROOT)