def test_validate_dict(self):
        """
        Only dict content type accepted is `custom_vector`. Other dict types may be added in the future.
        """
        test_mappings = {
            "my_custom_vector": {
                "type": "custom_vector"
            }
        }

        # ============== custom vector validate_dict tests ==============
        index_model_dimensions = 384
        # custom vector, valid
        obj = {"content": "custom content is here!!", "vector": [1.0 for _ in range(index_model_dimensions)]}
        assert validation.validate_dict(field="my_custom_vector",
                                        field_content=obj,
                                        is_non_tensor_field=False,
                                        mappings=test_mappings,
                                        index_model_dimensions=index_model_dimensions,
                                        marqo_index_version="2.9.0") == obj

        # custom vector, valid (no content). must be filled with empty string
        obj = {"vector": [1.0 for _ in range(index_model_dimensions)]}
        assert validation.validate_dict(field="my_custom_vector",
                                        field_content=obj,
                                        is_non_tensor_field=False,
                                        mappings=test_mappings,
                                        index_model_dimensions=index_model_dimensions,
                                        marqo_index_version="2.9.0") \
               == {"content": "", "vector": [1.0 for _ in range(index_model_dimensions)]}

        invalid_custom_vector_objects = [
            # Wrong vector length
            ({"content": "custom content is here!!", "vector": [1.0, 1.0, 1.0]}, "given vector is of length"),
            ({"content": "custom content is here!!", "vector": [1.0] * 1000}, "given vector is of length"),
            # Wrong content type
            ({"content": 12345, "vector": [1.0 for _ in range(index_model_dimensions)]},
             "must be one of the following types"),
            # Wrong vector type inside list (even if correct length)
            ({"content": "custom content is here!!",
              "vector": [1.0 for _ in range(index_model_dimensions - 1)] + ["NOT A FLOAT"]},
             "must be a list of numbers"),
            # Field that shouldn't be there
            ({"content": "custom content is here!!", "vector": [1.0 for _ in range(index_model_dimensions)],
              "extra_field": "blah"}, "unexpected extra fields"),
            # No vector
            ({"content": "custom content is here!!"}, "missing 'vector'"),
            # Nested dict inside custom vector content
            ({
                 "content": {
                     "content": "custom content is here!!",
                     "vector": [1.0 for _ in range(index_model_dimensions)]
                 },
                 "vector": [1.0 for _ in range(index_model_dimensions)]
             }, "must be one of the following types"),
        ]
        for case, error_message in invalid_custom_vector_objects:
            with self.subTest(f"case={case}, error_message={error_message}"):
                try:
                    validation.validate_dict(field="my_custom_vector",
                                             field_content=case,
                                             is_non_tensor_field=False,
                                             mappings=test_mappings,
                                             index_model_dimensions=index_model_dimensions,
                                             marqo_index_version="2.9.0")
                    raise AssertionError
                except ValidationError as e:
                    assert error_message in str(e.args[0][0].exc)

        # No index model dimensions
        with self.subTest("No index model dimensions"):
            with self.assertRaises(ValidationError) as cm:
                validation.validate_dict(field="my_custom_vector",
                                         field_content={"content": "custom content is here!!",
                                                        "vector": [1.0 for _ in range(index_model_dimensions)]},
                                         is_non_tensor_field=False,
                                         mappings=test_mappings,
                                         index_model_dimensions=None,
                                         marqo_index_version="2.9.0")
            self.assertIn("none is not an allowed value", str(cm.exception.args[0][0].exc))

        # Non-int index model dimensions
        with self.subTest("No index model dimensions"):
            with self.assertRaises(ValidationError) as cm:
                validation.validate_dict(field="my_custom_vector",
                                         field_content={"content": "custom content is here!!",
                                                        "vector": [1.0 for _ in range(index_model_dimensions)]},
                                         is_non_tensor_field=False,
                                         mappings=test_mappings,
                                         index_model_dimensions="wrong type",
                                         marqo_index_version="2.9.0")

            self.assertIn("value is not a valid integer", str(cm.exception.args[0][0].exc))

        Only dict content type accepted is `custom_vector`. Other dict types may be added in the future.
        
tests/integ_tests/tensor_search/test_validation.py