code: def test_post_invalid_body(client: TestClient):
      data = {"foo": 2.2, "3": 3.3}
      response = client.post("/index-weights/", json=data)
      assert response.status_code == 422, response.text
      assert response.json() == IsDict(
          {
              "detail": [
                  {
                      "type": "int_parsing",
                      "loc": ["body", "foo", "[key]"],
                      "msg": "Input should be a valid integer, unable to parse string as an integer",
                      "input": "foo",
                      "url": match_pydantic_error_url("int_parsing"),
                  }
              ]
          }
      ) | IsDict(
          # TODO: remove when deprecating Pydantic v1
          {
              "detail": [
                  {
                      "loc": ["body", "__key__"],
                      "msg": "value is not a valid integer",
                      "type": "type_error.integer",
                  }
              ]
          }
      )
  
imports: import pytest
  from dirty_equals import IsDict
  from fastapi.testclient import TestClient
  from fastapi.utils import match_pydantic_error_url
label_desc: Use image node_id 3 for calling a global function with example usage: test_post_invalid_body(client) without return types