def test_findPetsByTags(self):
        _, resp = app.op['findPetsByTags'](tags=[])

        raw = json.dumps([
            dict(id=1, name='Tom', category=dict(id=1, name='dog'), tags=[dict(id=1, name='small')]),
            dict(id=2, name='QQ', tags=[dict(id=1, name='small')])
        ])

        resp.apply_with(status=200, raw=raw)

        d = resp.data
        self.assertTrue(isinstance(d, Array))
        d1 = d[0]
        self.assertTrue(isinstance(d1, Model))
        self.assertEqual(d1.id, 1)
        self.assertEqual(d1.name, 'Tom')
        self.assertEqual(d1.tags, [dict(id=1, name='small')])
        self.assertEqual(d1.tags[0].name, 'small')
Pet.findPetsByTags
dataset/ETHPy150Open mission-liao/pyswagger/pyswagger/tests/v1_2/test_io.py/SwaggerResponse_TestCase.test_findPetsByTags