code: def test_media_types_q(self, app):
      api = restplus.Api(app)
  
      with app.test_request_context(
          "/foo",
          headers={
              "Accept": "application/json; q=1, application/xml; q=.5"
          },
      ):
          assert api.mediatypes() == [
              "application/json",
              "application/xml",
          ]
  
imports: from __future__ import unicode_literals
  import flask
  import pytest
  import six
  from json import dumps, JSONEncoder
  from flask import Blueprint, redirect, views
  from werkzeug.exceptions import HTTPException, Unauthorized, BadRequest
  import flask_restplus
label_desc: Use image node_id 15 for calling the APITest obj's underlying member method code with example usage: obj.test_media_types_q(app) without return types