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
78982f6b
Commit
78982f6b
authored
Dec 13, 2010
by
Kevin Morgan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding tests for a hierarchy of partials and lambdas in each.
parent
5f35d312
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletions
+8
-1
examples/partial_with_partial_and_lambda.mustache
+2
-0
tests/test_view.py
+6
-1
No files found.
examples/partial_with_partial_and_lambda.mustache
0 → 100644
View file @
78982f6b
{{>
partial_with_lambda
}}{{#
rot13
}}
abcdefghijklm
{{/
rot13
}}
\ No newline at end of file
tests/test_view.py
View file @
78982f6b
...
...
@@ -76,10 +76,15 @@ class TestView(unittest.TestCase):
view
.
template
=
'{{#sort}}zyxwvutsrqponmlkjihgfedcba{{/sort}}'
self
.
assertEquals
(
view
.
render
(),
'abcdefghijklmnopqrstuvwxyz'
)
def
test_partials_with_lambda
s
(
self
):
def
test_partials_with_lambda
(
self
):
view
=
Lambdas
()
view
.
template
=
'{{>partial_with_lambda}}'
self
.
assertEquals
(
view
.
render
(),
'nopqrstuvwxyz'
)
def
test_hierarchical_partials_with_lambdas
(
self
):
view
=
Lambdas
()
view
.
template
=
'{{>partial_with_partial_and_lambda}}'
self
.
assertEquals
(
view
.
render
(),
'nopqrstuvwxyznopqrstuvwxyz'
)
def
test_inverted
(
self
):
view
=
Inverted
()
...
...
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