def test_approximate_threshold_outside_range_error(self):
        """Test that approximateThreshold outside of 0 to 1 range returns validation error"""
        invalid_thresholds = [-0.1, -1.0, 1.1, 2.0, 5.0]

        for threshold in invalid_thresholds:
            with self.subTest(threshold=threshold):
                response = self.client.post("/indexes/" + self.structured_index.name + "/search?device=cpu", json={
                    "q": "test",
                    "searchMethod": "TENSOR",
                    "approximateThreshold": threshold
                })

                self.assertEqual(response.status_code, 422)
                self.assertEqual(response.json()["detail"][0]["type"], "value_error")
                self.assertIn(f"'approximateThreshold' must be between 0 and 1, got {threshold}",
                              response.json()["detail"][0]["msg"])
Test that approximateThreshold outside of 0 to 1 range returns validation error
tests/integ_tests/tensor_search/test_api.py