Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
04469a4e
Commit
04469a4e
authored
12 years ago
by
Calen Pennington
Browse files
Options
Downloads
Patches
Plain Diff
Strip out STATICFILES_DIRS that aren't in the mitx repo when running unit tests
parent
8ef81629
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/envs/test.py
+15
-0
15 additions, 0 deletions
lms/envs/test.py
with
15 additions
and
0 deletions
lms/envs/test.py
+
15
−
0
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
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment