docstr: It should perform validation with inheritance (allOf/$ref)
docstr_tok: ["It","should","perform","validation","with","inheritance","(","allOf\/","$","ref",")"]
code: def test_validation_with_inheritance(self, app, client):
      """It should perform validation with inheritance (allOf/$ref)"""
      api = restplus.Api(app, validate=True)
  
      fields = api.model(
          "Parent",
          {
              "name": restplus.fields.String(required=True),
          },
      )
  
      child_fields = api.inherit(
          "Child",
          fields,
          {
              "age": restplus.fields.Integer,
          },
      )
  
      @api.route("/validation/")
      class Inheritance(restplus.Resource):
          @api.expect(child_fields)
          def post(self):
              return {}
  
      client.post_json(
          "/validation/",
          {
              "name": "John Doe",
              "age": 15,
          },
      )
  
      self.assert_errors(
          client,
          "/validation/",
          {
              "age": "15",
          },
          "name",
          "age",
      )
  
imports: from __future__ import unicode_literals
  import flask_restplus
label_desc: Use image node_id 12 for calling the PayloadTest obj's underlying member method code with example usage: obj.test_validation_with_inheritance(app, client) and returns: dict