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
12c2e1bf
Commit
12c2e1bf
authored
11 years ago
by
Usman Khalid
Browse files
Options
Downloads
Patches
Plain Diff
Test TemplateLookup dirs are not cleared during lms startup.
LMS-2498
parent
751bd71a
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/tests.py
+23
-0
23 additions, 0 deletions
lms/tests.py
with
23 additions
and
0 deletions
lms/tests.py
0 → 100644
+
23
−
0
View file @
12c2e1bf
"""
Tests for the lms module itself.
"""
from
django.test
import
TestCase
from
edxmako
import
add_lookup
,
LOOKUP
from
lms
import
startup
class
TemplateLookupTests
(
TestCase
):
"""
Tests for TemplateLookup.
"""
def
test_add_lookup_to_main
(
self
):
"""
Test that any template directories added are not cleared when microsites are enabled.
"""
add_lookup
(
'
main
'
,
'
external_module
'
,
__name__
)
directories
=
LOOKUP
[
'
main
'
].
directories
self
.
assertEqual
(
len
([
dir
for
dir
in
directories
if
'
external_module
'
in
dir
]),
1
)
# This should not clear the directories list
startup
.
enable_microsites
()
directories
=
LOOKUP
[
'
main
'
].
directories
self
.
assertEqual
(
len
([
dir
for
dir
in
directories
if
'
external_module
'
in
dir
]),
1
)
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