def test_model(self):
        d = self.app.root.definitions['pet!##!Pet']
        self.assertEqual(d.required, ['id', 'name'])

        ps = d.properties.keys()
        self.assertEqual(sorted(ps), ['category', 'id', 'name', 'photoUrls', 'status', 'tags'])

        p = d.properties['id']
        self.assertEqual(p.type, 'integer')
        self.assertEqual(p.format, 'int64')
        self.assertEqual(p.description, 'unique identifier for the pet')
        self.assertEqual(p.minimum, 0)
        self.assertEqual(p.maximum, 100)

        p = d.properties['category']
        self.assertEqual(getattr(p, '$ref'), _pf('/definitions/pet!##!Category'))

        p = d.properties['photoUrls']
        self.assertEqual(p.type, 'array')
        self.assertEqual(p.items.type, 'string')

        p = d.properties['tags']
        self.assertEqual(p.type, 'array')
        self.assertEqual(getattr(p.items, '$ref'), _pf('/definitions/pet!##!Tag'))

        p = d.properties['status']
        self.assertEqual(p.type, 'string')
        self.assertEqual(p.enum, ['available', 'pending', 'sold'])
Model -> Definition
dataset/ETHPy150Open mission-liao/pyswagger/pyswagger/tests/v1_2/test_upgrade.py/Swagger_Upgrade_TestCase.test_model