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
3c83ed33
Commit
3c83ed33
authored
Dec 10, 2011
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor clean-ups of tests/test_loader.py.
parent
4e20cc2f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
tests/test_loader.py
+14
-13
No files found.
tests/test_loader.py
View file @
3c83ed33
import
unittest
import
pystache
class
TestLoader
(
unittest
.
TestCase
):
from
pystache.loader
import
Loader
class
LoaderTestCase
(
unittest
.
TestCase
):
def
test_template_is_loaded
(
self
):
loader
=
pystache
.
Loader
()
loader
=
Loader
()
template
=
loader
.
load_template
(
'simple'
,
'examples'
)
self
.
assertEqual
(
template
,
'Hi {{thing}}!{{blank}}'
)
def
test_using_list_of_paths
(
self
):
loader
=
pystache
.
Loader
()
loader
=
Loader
()
template
=
loader
.
load_template
(
'simple'
,
[
'doesnt_exist'
,
'examples'
])
self
.
assertEqual
(
template
,
'Hi {{thing}}!{{blank}}'
)
def
test_non_existent_template_fails
(
self
):
loader
=
pystache
.
Loader
()
self
.
assertRaises
(
IOError
,
loader
.
load_template
,
'simple'
,
'doesnt_exist'
)
\ No newline at end of file
loader
=
Loader
()
self
.
assertRaises
(
IOError
,
loader
.
load_template
,
'simple'
,
'doesnt_exist'
)
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