fix: correct "empty option" behavior for ObjectRef
schema type
This commit is contained in:
parent
16ed125113
commit
74e2a4f0e2
5 changed files with 22 additions and 2 deletions
|
@ -102,6 +102,11 @@ class TestObjectRef(DataTestCase):
|
|||
value = typ.serialize(node, person)
|
||||
self.assertEqual(value, person.uuid.hex)
|
||||
|
||||
# null w/ empty option
|
||||
typ = mod.ObjectRef(self.request, empty_option=('bad', 'BAD'))
|
||||
value = typ.serialize(node, colander.null)
|
||||
self.assertEqual(value, 'bad')
|
||||
|
||||
def test_deserialize(self):
|
||||
model = self.app.model
|
||||
node = colander.SchemaNode(colander.String())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue