Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Valentin Samir
django-cas-server
Commits
64420400
Commit
64420400
authored
Aug 02, 2016
by
Valentin Samir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add templatetags tests
parent
1a04b5af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
cas_server/tests/test_templatetags.py
cas_server/tests/test_templatetags.py
+32
-0
No files found.
cas_server/tests/test_templatetags.py
0 → 100644
View file @
64420400
# -*- coding: utf-8 -*-
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License version 3 for
# more details.
#
# You should have received a copy of the GNU General Public License version 3
# along with this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# (c) 2016 Valentin Samir
"""tests for the customs template tags"""
from
django.test
import
TestCase
from
cas_server
import
forms
from
cas_server.templatetags
import
cas_server
class
TemplateTagsTestCase
(
TestCase
):
"""tests for the customs template tags"""
def
test_is_checkbox
(
self
):
"""test for the template filter is_checkbox"""
form
=
forms
.
UserCredential
()
self
.
assertFalse
(
cas_server
.
is_checkbox
(
form
[
"username"
]))
self
.
assertTrue
(
cas_server
.
is_checkbox
(
form
[
"warn"
]))
def
test_is_hidden
(
self
):
"""test for the template filter is_hidden"""
form
=
forms
.
UserCredential
()
self
.
assertFalse
(
cas_server
.
is_hidden
(
form
[
"username"
]))
self
.
assertTrue
(
cas_server
.
is_hidden
(
form
[
"lt"
]))
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