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
7b7138b7
Commit
7b7138b7
authored
Dec 29, 2011
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test for rendering views via renderer.render(view).
parent
383acd31
Show 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 @
7b7138b7
...
@@ -10,6 +10,7 @@ import os
...
@@ -10,6 +10,7 @@ import os
import
sys
import
sys
import
unittest
import
unittest
from
examples.simple
import
Simple
from
pystache
import
renderer
from
pystache
import
renderer
from
pystache.renderer
import
Renderer
from
pystache.renderer
import
Renderer
from
pystache.locator
import
Locator
from
pystache.locator
import
Locator
...
@@ -394,6 +395,18 @@ class RendererTestCase(unittest.TestCase):
...
@@ -394,6 +395,18 @@ class RendererTestCase(unittest.TestCase):
actual
=
renderer
.
render
(
say_hello
,
to
=
'Mars'
)
actual
=
renderer
.
render
(
say_hello
,
to
=
'Mars'
)
self
.
assertEquals
(
'Hello, Mars'
,
actual
)
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,
# By testing that Renderer.render() constructs the right RenderEngine,
# we no longer need to exercise all rendering code paths through
# we no longer need to exercise all rendering code paths through
# the Renderer. It suffices to test rendering paths through the
# 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