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
f5b37f72
Commit
f5b37f72
authored
Apr 01, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed the word "view" from the Complex example.
parent
dec5054d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
examples/complex.mustache
+0
-0
examples/complex.py
+1
-1
tests/test_simple.py
+2
-2
tests/test_template_spec.py
+3
-3
No files found.
examples/complex
_view
.mustache
→
examples/complex.mustache
View file @
f5b37f72
File moved
examples/complex
_view
.py
→
examples/complex.py
View file @
f5b37f72
class
Complex
View
(
object
):
class
Complex
(
object
):
def
header
(
self
):
return
"Colors"
...
...
tests/test_simple.py
View file @
f5b37f72
...
...
@@ -3,7 +3,7 @@ import unittest
import
pystache
from
pystache
import
Renderer
from
examples.nested_context
import
NestedContext
from
examples.complex
_view
import
ComplexView
from
examples.complex
import
Complex
from
examples.lambdas
import
Lambdas
from
examples.template_partial
import
TemplatePartial
from
examples.simple
import
Simple
...
...
@@ -20,7 +20,7 @@ class TestSimple(unittest.TestCase, AssertStringMixin):
def
test_looping_and_negation_context
(
self
):
template
=
'{{#item}}{{header}}: {{name}} {{/item}}{{^item}} Shouldnt see me{{/item}}'
context
=
Complex
View
()
context
=
Complex
()
renderer
=
Renderer
()
expected
=
renderer
.
render
(
template
,
context
)
...
...
tests/test_template_spec.py
View file @
f5b37f72
...
...
@@ -10,7 +10,7 @@ import sys
import
unittest
from
examples.simple
import
Simple
from
examples.complex
_view
import
ComplexView
from
examples.complex
import
Complex
from
examples.lambdas
import
Lambdas
from
examples.inverted
import
Inverted
,
InvertedLists
from
pystache
import
TemplateSpec
as
Template
...
...
@@ -84,8 +84,8 @@ class ViewTestCase(unittest.TestCase, AssertStringMixin):
def
test_complex
(
self
):
renderer
=
Renderer
()
expected
=
renderer
.
render
(
Complex
View
())
self
.
assert
Equals
(
expected
,
"""
\
expected
=
renderer
.
render
(
Complex
())
self
.
assert
String
(
expected
,
u
"""
\
<h1>Colors</h1>
<ul>
<li><strong>red</strong></li>
...
...
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