You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2014/12/10 02:44:45 UTC
svn commit: r1644302 - /qpid/dispatch/trunk/tests/management/schema.py
Author: aconway
Date: Wed Dec 10 01:44:45 2014
New Revision: 1644302
URL: http://svn.apache.org/r1644302
Log:
NO-JIRA: Fix test failure in management.schema unit tests.
Modified:
qpid/dispatch/trunk/tests/management/schema.py
Modified: qpid/dispatch/trunk/tests/management/schema.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/management/schema.py?rev=1644302&r1=1644301&r2=1644302&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/management/schema.py (original)
+++ qpid/dispatch/trunk/tests/management/schema.py Wed Dec 10 01:44:45 2014
@@ -120,10 +120,12 @@ class SchemaTest(unittest.TestCase):
'foo': {'type':'String', 'default':'FOO'},
'req': {'type':'Integer', 'required':True},
'e': {'type':['x', 'y']}})
+ e.init()
self.assertRaises(ValidationError, e.validate, {}) # Missing required 'req'
self.assertEqual(e.validate({'req':42}), {'foo': 'FOO', 'req': 42})
# Try with an annotation
e = EntityType('e2', s, attributes={'x':{'type':'Integer'}}, annotations=['i1', 'i2'])
+ e.init()
self.assertEqual(e.validate({'x':1}), {'x':1, 'foo1': 'FOO1', 'foo2': 'FOO2'})
def test_entity_refs(self):
@@ -147,6 +149,7 @@ class SchemaTest(unittest.TestCase):
'identity': {'type':'String', 'default':'$name', "required": True}}}})
e = EntityType('MyEntity', s, attributes={}, annotations=['i1'])
+ e.init()
self.assertEqual({'identity': 'x', 'name': 'x'}, e.validate({'identity':'x'}))
self.assertEqual({'identity': 'x', 'name': 'x'}, e.validate({'name':'x'}))
self.assertEqual({'identity': 'x', 'name': 'y'}, e.validate({'identity': 'x', 'name':'y'}))
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org