Permalink
Browse files

Make tests pass again.

  • Loading branch information...
1 parent cc9f8c4 commit 34b3748126c1f1b10881dd80f82bff66efa8a883 @mcdonc mcdonc committed May 8, 2010
Showing with 7 additions and 4 deletions.
  1. +3 −0 CHANGES.txt
  2. +4 −4 colander/tests.py
View
@@ -17,6 +17,9 @@ Next release
``Invalid date`` instead of ``_('${val} cannot be parsed as an
iso8601 date: ${err}')``. This is in support of Deform.
+- Fix bug in ``colander.Boolean`` that attempted to call ``.lower`` on
+ a bool value when a default value was found for the schema node.
+
0.6.1 (2010-05-04)
------------------
View
@@ -911,7 +911,7 @@ def test_serialize_emptystring_notrequired(self):
node = DummySchemaNode(None, default='default')
typ = self._makeOne()
result = typ.deserialize(node, val)
- self.assertEqual(result, True)
+ self.assertEqual(result, 'default')
def test_deserialize(self):
typ = self._makeOne()
@@ -1158,7 +1158,7 @@ def test_deserialize_invalid_ParseError(self):
node = DummySchemaNode(None)
typ = self._makeOne()
e = invalid_exc(typ.deserialize, node, 'garbage')
- self.failUnless('cannot be parsed' in e.msg)
+ self.failUnless('Invalid' in e.msg)
def test_deserialize_success(self):
import iso8601
@@ -1210,13 +1210,13 @@ def test_deserialize_invalid_ParseError(self):
node = DummySchemaNode(None)
typ = self._makeOne()
e = invalid_exc(typ.deserialize, node, 'garbage')
- self.failUnless('cannot be parsed' in e.msg)
+ self.failUnless('Invalid' in e.msg)
def test_deserialize_invalid_weird(self):
node = DummySchemaNode(None)
typ = self._makeOne()
e = invalid_exc(typ.deserialize, node, '10-10-10-10')
- self.failUnless('cannot be parsed' in e.msg)
+ self.failUnless('Invalid' in e.msg)
def test_deserialize_empty_required(self):
node = DummySchemaNode(None)

0 comments on commit 34b3748

Please sign in to comment.