Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-pipeline
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
django-pipeline
Commits
4171027e
Commit
4171027e
authored
Nov 28, 2013
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test for templatetags
parent
5ed621c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
tests/tests/test_template.py
+9
-1
No files found.
tests/tests/test_template.py
View file @
4171027e
...
@@ -42,6 +42,14 @@ class DjangoTest(TestCase):
...
@@ -42,6 +42,14 @@ class DjangoTest(TestCase):
def
render_template
(
self
,
template
):
def
render_template
(
self
,
template
):
return
Template
(
template
)
.
render
(
Context
())
return
Template
(
template
)
.
render
(
Context
())
def
test_compressed_
css
(
self
):
def
test_compressed_
empty
(
self
):
rendered
=
self
.
render_template
(
u"""{
%
load compressed
%
}{
%
compressed_css "unknow"
%
}"""
)
rendered
=
self
.
render_template
(
u"""{
%
load compressed
%
}{
%
compressed_css "unknow"
%
}"""
)
self
.
assertEqual
(
u""
,
rendered
)
self
.
assertEqual
(
u""
,
rendered
)
def
test_compressed_css
(
self
):
rendered
=
self
.
render_template
(
u"""{
%
load compressed
%
}{
%
compressed_css "screen"
%
}"""
)
self
.
assertEqual
(
u'<link href="/static/screen.css" rel="stylesheet" type="text/css" />'
,
rendered
)
def
test_compressed_js
(
self
):
rendered
=
self
.
render_template
(
u"""{
%
load compressed
%
}{
%
compressed_js "scripts"
%
}"""
)
self
.
assertEqual
(
u'<script type="text/css" src="/static/scripts.css" charset="utf-8"></script>'
,
rendered
)
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