def test_read_property(self): schema = jsch.Schema(max_properties=6) self.assertEqual(6, schema.max_properties)
def test_read_unassigned_property(self): schema = jsch.Schema() self.assertIsNone(schema.type)
def test_read_property(self): schema = jsch.Schema(unique_items=True) self.assertEqual(True, schema.unique_items)
def test_read_property(self): schema = jsch.Schema(required=['name', 'age']) self.assertEqual(['name', 'age'], schema.required)
def test_read_property(self): schema = jsch.Schema(title='jsch') self.assertEqual('jsch', schema.title)
def test_set_property(self): schema = jsch.Schema() message = "can't set keyword attribute" with self.assertRaisesAttributeError(message): schema.properties = {'name': jsch.Schema()}
def test_read_property(self): schema = jsch.Schema(ref='#/definitions/person') self.assertEqual('#/definitions/person', schema.ref)
def test_read_unassigned_property(self): schema = jsch.Schema() self.assertIsNone(schema.additional_properties)
def test_read_property(self): schema = jsch.Schema(minimum=6.2) self.assertEqual(6.2, schema.minimum)
def test_read_property(self): schema = jsch.Schema(min_length=2) self.assertEqual(2, schema.min_length)
def test_read_property(self): schema = jsch.Schema(min_properties=4) self.assertEqual(4, schema.min_properties)
def test_read_property(self): schema = jsch.Schema(min_items=3) self.assertEqual(3, schema.min_items)
def test_read_property(self): schema = jsch.Schema(additional_properties=True) self.assertEqual(True, schema.additional_properties)
def test_read_property(self): schema = jsch.Schema(maximum=8.9) self.assertEqual(8.9, schema.maximum)
def test_read_unassigned_property(self): schema = jsch.Schema() self.assertIsNone(schema.pattern_properties)
def test_read_property(self): schema = jsch.Schema(multiple_of=4.7) self.assertEqual(4.7, schema.multiple_of)
def test_read_property(self): schema = jsch.Schema(properties={'name': jsch.Schema()}) self.assertEqual({'name': jsch.Schema()}, schema.properties)
def test_set_property(self): schema = jsch.Schema() message = "can't set keyword attribute" with self.assertRaisesAttributeError(message): schema.multiple_of = 4.7
def test_read_property(self): schema = jsch.Schema(all_of=[jsch.Schema()]) self.assertEqual([jsch.Schema()], schema.all_of)
def test_set_property(self): schema = jsch.Schema() message = "can't set keyword attribute" with self.assertRaisesAttributeError(message): schema.additional_properties = True
def test_set_property(self): schema = jsch.Schema() message = "can't set keyword attribute" with self.assertRaisesAttributeError(message): schema.ref = '#/definitions/person'
def test_read_property(self): schema = jsch.Schema(not_=jsch.Schema()) self.assertEqual(jsch.Schema(), schema.not_)
def test_set_property(self): schema = jsch.Schema() message = "can't set keyword attribute" with self.assertRaisesAttributeError(message): schema.required = ['name', 'age']
def test_read_property(self): schema = jsch.Schema(pattern='[0-9A-Z]') self.assertEqual('[0-9A-Z]', schema.pattern)
def test_read_property(self): schema = jsch.Schema(type='string') self.assertEqual('string', schema.type)
def test_set_property(self): schema = jsch.Schema() message = "can't set keyword attribute" with self.assertRaisesAttributeError(message): schema.pattern = '[0-9A-Z]'
def test_set_property(self): schema = jsch.Schema() message = "can't set keyword attribute" with self.assertRaisesAttributeError(message): schema.type = 'string'
def test_read_property(self): schema = jsch.Schema(pattern_properties={'[0-9]': jsch.Schema()}) self.assertEqual({'[0-9]': jsch.Schema()}, schema.pattern_properties)
def test_read_unassigned_property(self): schema = jsch.Schema() self.assertIsNone(schema.unique_items)
def test_read_property(self): schema = jsch.Schema(items=jsch.Schema()) self.assertEqual(jsch.Schema(), schema.items)