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
200adfaa
Commit
200adfaa
authored
Sep 09, 2015
by
Ned Batchelder
Committed by
David Baumgold
Sep 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A test for optional_include_mako
parent
e1c898ff
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
0 deletions
+26
-0
common/djangoapps/pipeline_mako/templates/test_exists.html
+2
-0
common/djangoapps/pipeline_mako/templates/test_optional_include_mako.html
+8
-0
common/djangoapps/pipeline_mako/tests/__init__.py
+0
-0
common/djangoapps/pipeline_mako/tests/test_static_content.py
+16
-0
No files found.
common/djangoapps/pipeline_mako/templates/test_exists.html
0 → 100644
View file @
200adfaa
# Only for testing.
<p>
This is test_exists.html
</p>
common/djangoapps/pipeline_mako/templates/test_optional_include_mako.html
0 → 100644
View file @
200adfaa
# A test template for optional_include_mako
<
%
namespace
name=
'static'
file=
'static_content.html'
/>
<p>
Welcome to test_optional_include_mako.html
</p>
<
%
static:optional_include_mako
file=
"test_exists.html"
/>
<
%
static:optional_include_mako
file=
"definitely_doesnt_exist.html"
/>
common/djangoapps/pipeline_mako/tests/__init__.py
0 → 100644
View file @
200adfaa
common/djangoapps/pipeline_mako/tests/test_static_content.py
0 → 100644
View file @
200adfaa
"""
Tests of pipeline_mako/templates/static_content.html
"""
import
unittest
from
edxmako.shortcuts
import
render_to_string
class
TestStaticContent
(
unittest
.
TestCase
):
"""Tests for static_content.html"""
def
test_optional_include_mako
(
self
):
out
=
render_to_string
(
"test_optional_include_mako.html"
,
{})
self
.
assertIn
(
"Welcome to test_optional_include_mako.html"
,
out
)
self
.
assertIn
(
"This is test_exists.html"
,
out
)
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