Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
04469a4e
Commit
04469a4e
authored
Jul 16, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Strip out STATICFILES_DIRS that aren't in the mitx repo when running unit tests
parent
8ef81629
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
lms/envs/test.py
+15
-0
No files found.
lms/envs/test.py
View file @
04469a4e
...
...
@@ -84,6 +84,21 @@ DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
MEDIA_ROOT
=
TEST_ROOT
/
"uploads"
MEDIA_URL
=
"/static/uploads/"
STATICFILES_DIRS
.
append
((
"uploads"
,
MEDIA_ROOT
))
new_staticfiles_dirs
=
[]
# Strip out any static files that aren't in the repository root
# so that the tests can run with only the mitx directory checked out
for
static_dir
in
STATICFILES_DIRS
:
# Handle both tuples and non-tuple directory definitions
try
:
_
,
data_dir
=
static_dir
except
ValueError
:
data_dir
=
static_dir
if
not
data_dir
.
startswith
(
REPO_ROOT
):
new_staticfiles_dirs
.
append
(
static_dir
)
STATICFILES_DIRS
=
new_staticfiles_dirs
FILE_UPLOAD_TEMP_DIR
=
PROJECT_ROOT
/
"uploads"
FILE_UPLOAD_HANDLERS
=
(
'django.core.files.uploadhandler.MemoryFileUploadHandler'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment