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
12c2e1bf
Commit
12c2e1bf
authored
Apr 03, 2014
by
Usman Khalid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test TemplateLookup dirs are not cleared during lms startup.
LMS-2498
parent
751bd71a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
lms/tests.py
+23
-0
No files found.
lms/tests.py
0 → 100644
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
)
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