Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pystache_custom
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
OpenEdx
pystache_custom
Commits
7e0270b0
Commit
7e0270b0
authored
Dec 29, 2011
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Plain Diff
Merge 'issue_70' into development: can now render views via Renderer.render().
parents
aa8ad43d
7b7138b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
tests/test_renderer.py
+13
-0
No files found.
tests/test_renderer.py
View file @
7e0270b0
...
...
@@ -10,6 +10,7 @@ import os
import
sys
import
unittest
from
examples.simple
import
Simple
from
pystache
import
renderer
from
pystache.renderer
import
Renderer
from
pystache.locator
import
Locator
...
...
@@ -394,6 +395,18 @@ class RendererTestCase(unittest.TestCase):
actual
=
renderer
.
render
(
say_hello
,
to
=
'Mars'
)
self
.
assertEquals
(
'Hello, Mars'
,
actual
)
def
test_render__view
(
self
):
"""
Test rendering a View instance.
"""
renderer
=
Renderer
()
view
=
Simple
()
actual
=
renderer
.
render
(
view
)
self
.
assertEquals
(
'Hi pizza!'
,
actual
)
# By testing that Renderer.render() constructs the right RenderEngine,
# we no longer need to exercise all rendering code paths through
# the Renderer. It suffices to test rendering paths through the
...
...
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