Skip to content

Commit

Permalink
tests: render each widget
Browse files Browse the repository at this point in the history
  • Loading branch information
crucialfelix committed Nov 3, 2015
1 parent e5f869c commit e42b9ce
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions tests/test_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,32 @@
from ajax_select import fields


class TestAjaxSelectAutoCompleteSelectWidget(TestCase):
class WidgetTester(TestCase):
pass


class TestAutoCompleteSelectWidget(WidgetTester):

def test_render(self):
channel = None
channel = 'book'
widget = fields.AutoCompleteSelectWidget(channel)
widget
out = widget.render('book', None)
self.assertTrue('autocompleteselect' in out)


class TestAutoCompleteSelectMultipleWidget(WidgetTester):

def test_render(self):
channel = 'book'
widget = fields.AutoCompleteSelectMultipleWidget(channel)
out = widget.render('book', None)
self.assertTrue('autocompleteselectmultiple' in out)


class TestAutoCompleteWidget(WidgetTester):

def test_render(self):
channel = 'book'
widget = fields.AutoCompleteWidget(channel)
out = widget.render('book', None)
self.assertTrue('autocomplete' in out)

0 comments on commit e42b9ce

Please sign in to comment.