Allow direct article resolution in machine max MCP

This commit is contained in:
2026-09-26 13:52:08 +02:00
parent eca151a465
commit 0c18c86a47
5 changed files with 154 additions and 13 deletions
+20
View File
@@ -164,6 +164,26 @@ class CalculationApiTests(unittest.TestCase):
["roll_diameter_nominal"],
)
def test_machine_maximum_length_endpoint_does_not_accept_mcp_article_convenience(self):
response = self.client.post(
"/api/calculations/machine-max-product-length",
json={
"article_number": "218500",
"machine": "K7",
"core_diameter_mm": 133,
},
headers=self.headers,
)
self.assertEqual(response.status_code, 200)
self.assertEqual(response.get_json(), {
"status": "invalid_parameter",
"invalid": [{
"field": "request",
"message": "unknown request fields: article_number",
}],
})
def test_machine_maximum_length_endpoint_preserves_domain_outcomes(self):
incompatible = self.client.post(
"/api/calculations/machine-max-product-length",