added unittest for bug #156

This commit is contained in:
darius BERNARD 2015-03-30 17:00:37 +02:00
parent ea9ae1176e
commit 0e331d5e33
2 changed files with 17 additions and 1 deletions

View file

@ -349,7 +349,7 @@ class MultipleSelect2HiddenInput(forms.TextInput):
return False
### Heavy mixins and widgets ###
# ## Heavy mixins and widgets ###
class HeavySelect2Mixin(Select2Mixin):
"""

16
tests/test_widgets.py Normal file
View file

@ -0,0 +1,16 @@
# -*- coding:utf-8 -*-
from __future__ import print_function, unicode_literals
class TestWidgets(object):
url = ""
def test_is_hidden_multiple(self):
from django_select2.widgets import HeavySelect2MultipleWidget
new_widget = HeavySelect2MultipleWidget(data_url="/")
assert new_widget.is_hidden is False
def test_is_hidden(self):
from django_select2.widgets import HeavySelect2Widget
new_widget = HeavySelect2Widget(data_url="/")
assert new_widget.is_hidden is False