Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
f1f2bd8f
Commit
f1f2bd8f
authored
12 years ago
by
Calen Pennington
Browse files
Options
Downloads
Patches
Plain Diff
Start adding tests for static replacement
parent
401f564e
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/djangoapps/static_replace/__init__.py
+0
-0
0 additions, 0 deletions
common/djangoapps/static_replace/__init__.py
common/djangoapps/static_replace/test/test_static_replace.py
+20
-0
20 additions, 0 deletions
common/djangoapps/static_replace/test/test_static_replace.py
with
20 additions
and
0 deletions
common/djangoapps/static_replace.py
→
common/djangoapps/static_replace
/__init__
.py
+
0
−
0
View file @
f1f2bd8f
File moved
This diff is collapsed.
Click to expand it.
common/djangoapps/static_replace/test/test_static_replace.py
0 → 100644
+
20
−
0
View file @
f1f2bd8f
from
nose.tools
import
assert_equals
from
static_replace
import
replace_static_urls
,
replace_course_urls
DATA_DIRECTORY
=
'
data_dir
'
COURSE_ID
=
'
org/course/run
'
def
test_multi_replace
():
static_source
=
'"
/static/file.png
"'
course_source
=
'"
/course/file.png
"'
assert_equals
(
replace_static_urls
(
static_source
,
DATA_DIRECTORY
),
replace_static_urls
(
replace_static_urls
(
static_source
,
DATA_DIRECTORY
),
DATA_DIRECTORY
)
)
assert_equals
(
replace_course_urls
(
course_source
,
COURSE_ID
),
replace_course_urls
(
replace_course_urls
(
course_source
,
COURSE_ID
),
COURSE_ID
)
)
assert
False
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