Skip to content

Commit

Permalink
Make this test more robust.
Browse files Browse the repository at this point in the history
  • Loading branch information
dnouri committed Jun 25, 2013
1 parent ab85942 commit 017b870
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions deform_bootstrap/tests/test_widget.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import json
import unittest

from deform.tests.test_widget import DummyField, DummyRenderer, DummySchema
Expand Down Expand Up @@ -29,7 +30,6 @@ def test_serialize_None(self):
self.assertEqual(renderer.kw['cstruct'], '')

def test_serialize_iterable(self):
import json
widget = self._makeOne()
values = [1, 2, 3, 4]
widget.values = values
Expand Down Expand Up @@ -60,8 +60,10 @@ def test_serialize_remote(self):
self.assertEqual(renderer.kw['values'],
('function (query, process){'
'$.getJSON("/items", {"term": query}, process);}'))
self.assertEqual(renderer.kw['options'],
', "minLength": 2, "items": 5')
self.assertEqual(
json.loads('{' + renderer.kw['options'][1:] + '}'),
{'minLength': 2, 'items': 5}
)

def test_serialize_not_null_readonly(self):
widget = self._makeOne()
Expand Down

0 comments on commit 017b870

Please sign in to comment.