def test_approximate_threshold_with_approximate_false_error(self):
        """Test that approximateThreshold used when approximate=false returns validation error"""
        response = self.client.post("/indexes/" + self.structured_index.name + "/search?device=cpu", json={
            "q": "test",
            "searchMethod": "TENSOR",
            "approximate": False,
            "approximateThreshold": 0.5
        })

        self.assertEqual(response.status_code, 422)
        self.assertEqual(response.json()["detail"][0]["type"], "value_error")
        self.assertIn("'approximateThreshold' cannot be set when 'approximate' is False",
                      response.json()["detail"][0]["msg"])
Test that approximateThreshold used when approximate=false returns validation error
tests/integ_tests/tensor_search/test_api.py