Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@
# Enterprise service settings
ENTERPRISE_CATALOG_INTERNAL_ROOT_URL,

# Blockstore
BLOCKSTORE_USE_BLOCKSTORE_APP_API,
BUNDLE_ASSET_STORAGE_SETTINGS,

# Methods to derive settings
_make_mako_template_dirs,
_make_locale_paths,
Expand Down Expand Up @@ -1746,6 +1750,9 @@

# For edx ace template tags
'edx_ace',

# Blockstore
'blockstore.apps.bundles',
]


Expand Down Expand Up @@ -2102,6 +2109,7 @@

DATABASE_ROUTERS = [
'openedx.core.lib.django_courseware_routers.StudentModuleHistoryExtendedRouter',
'openedx.core.lib.blockstore_api.db_routers.BlockstoreRouter',
]

############################ Cache Configuration ###############################
Expand Down
24 changes: 17 additions & 7 deletions cms/envs/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

# import settings from LMS for consistent behavior with CMS
from lms.envs.test import ( # pylint: disable=wrong-import-order
BLOCKSTORE_USE_BLOCKSTORE_APP_API,
BLOCKSTORE_API_URL,
COMPREHENSIVE_THEME_DIRS, # unimport:skip
DEFAULT_FILE_STORAGE,
ECOMMERCE_API_URL,
Expand All @@ -40,7 +42,8 @@
REGISTRATION_EXTRA_FIELDS,
GRADES_DOWNLOAD,
SITE_NAME,
WIKI_ENABLED
WIKI_ENABLED,
XBLOCK_RUNTIME_V2_EPHEMERAL_DATA_CACHE,
)


Expand Down Expand Up @@ -175,13 +178,26 @@
'course_structure_cache': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
},
'blockstore': {
'KEY_PREFIX': 'blockstore',
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': 'edx_loc_mem_cache',
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
},
}

############################### BLOCKSTORE #####################################
# Blockstore tests
RUN_BLOCKSTORE_TESTS = os.environ.get('EDXAPP_RUN_BLOCKSTORE_TESTS', 'no').lower() in ('true', 'yes', '1')
BLOCKSTORE_API_URL = os.environ.get('EDXAPP_BLOCKSTORE_API_URL', "http://edx.devstack.blockstore-test:18251/api/v1/")
BLOCKSTORE_API_AUTH_TOKEN = os.environ.get('EDXAPP_BLOCKSTORE_API_AUTH_TOKEN', 'edxapp-test-key')
BUNDLE_ASSET_STORAGE_SETTINGS = dict(
STORAGE_CLASS='django.core.files.storage.FileSystemStorage',
STORAGE_KWARGS=dict(
location=MEDIA_ROOT,
base_url=MEDIA_URL,
),
)

################################# CELERY ######################################

Expand Down Expand Up @@ -267,12 +283,6 @@
TEST_ELASTICSEARCH_HOST = os.environ.get('EDXAPP_TEST_ELASTICSEARCH_HOST', 'edx.devstack.elasticsearch710')
TEST_ELASTICSEARCH_PORT = int(os.environ.get('EDXAPP_TEST_ELASTICSEARCH_PORT', '9200'))

############################# TEMPLATE CONFIGURATION #############################
# Adds mako template dirs for content_libraries tests
MAKO_TEMPLATE_DIRS_BASE.append(
COMMON_ROOT / 'lib' / 'capa' / 'capa' / 'templates'
)

########################## AUTHOR PERMISSION #######################
FEATURES['ENABLE_CREATOR_GROUP'] = False

Expand Down
2 changes: 2 additions & 0 deletions cms/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@
except ImportError:
pass

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

urlpatterns += static(
settings.VIDEO_IMAGE_SETTINGS['STORAGE_KWARGS']['base_url'],
document_root=settings.VIDEO_IMAGE_SETTINGS['STORAGE_KWARGS']['location']
Expand Down
4 changes: 2 additions & 2 deletions common/lib/xmodule/xmodule/contentstore/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import AssetKey, CourseKey
from opaque_keys.edx.locator import AssetLocator
from opaque_keys.edx.locator import AssetLocator, LibraryLocatorV2
from PIL import Image

from xmodule.assetstore.assetmgr import AssetManager
Expand Down Expand Up @@ -123,7 +123,7 @@ def get_static_path_from_location(location):

@staticmethod
def get_base_url_path_for_course_assets(course_key): # lint-amnesty, pylint: disable=missing-function-docstring
if course_key is None:
if (course_key is None) or isinstance(course_key, LibraryLocatorV2):
return None

assert isinstance(course_key, CourseKey)
Expand Down
96 changes: 0 additions & 96 deletions common/test/problem.html

This file was deleted.

16 changes: 0 additions & 16 deletions common/test/problem_ajax.html

This file was deleted.

122 changes: 0 additions & 122 deletions common/test/video.html

This file was deleted.

Loading