Commit 200adfaa by Ned Batchelder Committed by David Baumgold

A test for optional_include_mako

parent e1c898ff
# Only for testing.
<p>This is test_exists.html</p>
# 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" />
"""
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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment