text: from .objects import schema
  from tests.graphql.graphql_test_utils import GraphQLTestCase, remove_ws
  
  
  class Test(GraphQLTestCase):
      GRAPHQL_SCHEMA = schema
      REF_GRAPHQL_SCHEMA = """
          schema {
            query: Query
          }
          
          type ActionInfo {
            name: String!
            parameters: [FieldInfo!]!
            data: [FieldInfo!]!
            return_type: String!
            permitted: Boolean!
            deny_reason: String
            retry_in: Duration
            mutation: Boolean!
            __str__: String!
          }
          
          scalar Duration
          
          type FieldInfo {
            name: String!
            typename: String!
            default: String
            __str__: String!
          }
          
          type ObjectInfo {
            name: String!
            pk_field: String
            actions: [ActionInfo!]!
            __str__: String!
          }
          
          type Query {
            get(in: Duration!): Duration!
            getObject(in: TestObjectInput!): TestObject!
            __types: [TypeInfo!]!
            __objects: [ObjectInfo!]!
            __actions: [ActionInfo!]!
          }
          
          type TestObject {
            duration: Duration!
            __str__: String!
            __actions: [ActionInfo!]!
          }
          
          input TestObjectInput {
            duration: Duration!
          }
          
          type TypeInfo {
            typename: String!
            fields: [FieldInfo!]!
            __str__: String!
          }
      """
  
      REF_META_SCHEMA = {
          "data": {
              "__types": [
                  {
                      "typename": "TestObject",
                      "fields": [
                          {
                              "name": "duration",
                              "typename": "Duration!"
                          }
                      ]
                  }
              ],
              "__objects": [],
              "__actions": [
                  {
                      "name": "get",
                      "parameters": [
                          {
                              "name": "in",
                              "typename": "Duration!",
                              "default": None
                          }
                      ],
                      "data": [],
                      "mutation": False,
                      "return_type": "Duration!",
                      "permitted": True,
                      "deny_reason": None,
                      "retry_in": None
                  },
                  {
                      "name": "getObject",
                      "parameters": [
                          {
                              "name": "in",
                              "typename": "TestObject!",
                              "default": None
                          }
                      ],
                      "data": [],
                      "mutation": False,
                      "return_type": "TestObject!",
                      "permitted": True,
                      "deny_reason": None,
                      "retry_in": None
                  }
              ]
          }
      }
  
      def test_request(self):
          resp = self.query(
              """
              query q{
                get(in: "2 days, 0:00:20.3")
                getObject(in: {duration: "12:34:56"}){
                  duration
                }
              }
              """
          )
  
          exp = {
              "data": {
                  "get": "2 days, 0:00:20.300000",
                  "getObject": {
                      "duration": "12:34:56"
                  }
              }
          }
  
          self.assertResponseNoErrors(resp)
          self.assertJSONEqual(resp.content, exp)
  