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
ecc7f242
Commit
ecc7f242
authored
Dec 23, 2012
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove tests
parent
14ea9b65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
60 deletions
+0
-60
tests/tests/jinja2.py
+0
-60
No files found.
tests/tests/jinja2.py
deleted
100644 → 0
View file @
14ea9b65
# -*- coding: utf-8 -*-
from
__future__
import
absolute_import
from
django.conf
import
settings
from
django.test
import
TestCase
from
jinja2
import
Environment
,
FileSystemLoader
from
pipeline.packager
import
PackageNotFound
from
pipeline.jinja2.ext
import
compressed_css
,
compressed_js
,
Jinja2Compressed
class
Jinja2Test
(
TestCase
):
def
setUp
(
self
):
from
django.template.loaders
import
app_directories
# has to be here
self
.
loader
=
FileSystemLoader
((
app_directories
.
app_template_dirs
+
settings
.
TEMPLATE_DIRS
))
self
.
environment
=
Environment
(
loader
=
self
.
loader
)
self
.
environment
.
globals
[
'compressed_css'
]
=
compressed_css
self
.
environment
.
globals
[
'compressed_js'
]
=
compressed_js
self
.
maxDiff
=
None
def
test_exception_raised_with_unknown_ftype
(
self
):
try
:
Jinja2Compressed
(
'png'
)
self
.
fail
()
except
PackageNotFound
:
pass
def
test_template_css_function_individual
(
self
):
settings
.
PIPELINE
=
False
try
:
tpl
=
self
.
environment
.
get_template
(
'css.jinja'
)
tpl
.
render
()
except
:
self
.
fail
(
'Failed to load individual CSS'
)
def
test_template_css_function_compressed
(
self
):
settings
.
PIPELINE
=
True
try
:
tpl
=
self
.
environment
.
get_template
(
'css.jinja'
)
tpl
.
render
()
except
:
self
.
fail
(
'Failed to load compressed CSS'
)
def
test_template_js_function_individual
(
self
):
settings
.
PIPELINE
=
False
try
:
tpl
=
self
.
environment
.
get_template
(
'js.jinja'
)
tpl
.
render
()
except
:
self
.
fail
(
'Failed to load individual JS'
)
def
test_template_js_function_compressed
(
self
):
settings
.
PIPELINE
=
True
try
:
tpl
=
self
.
environment
.
get_template
(
'js.jinja'
)
tpl
.
render
()
except
:
self
.
fail
(
'Failed to load compressed JS'
)
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