latest changes

This commit is contained in:
Joren de Graaf
2026-10-22 10:32:41 +02:00
parent 5799b542c8
commit 5b986134be
63 changed files with 2412 additions and 77 deletions
+3 -1
View File
@@ -99,6 +99,7 @@ class McpHttpTests(LiveServerTestCase):
async with Client(streamable_http_client(self.mcp_url, http_client=http)) as client:
return await operation(client)
@override_settings(SECURE_SSL_REDIRECT=True)
def test_authentication_and_scope_boundaries(self):
async def check():
async with httpx2.AsyncClient(timeout=10) as http:
@@ -293,6 +294,7 @@ class McpHttpTests(LiveServerTestCase):
self.assertEqual((await client.call_tool('stress_search')).structured_content['total'], 1)
asyncio.run(self._client(secret, check))
@override_settings(SECURE_SSL_REDIRECT=True)
def test_food_inventory_tools_and_user_isolation(self):
previous_day = localdate_for_user(self.a) - timedelta(days=1)
FoodLogEntry.objects.create(user=self.a, date=previous_day, meal='breakfast',
@@ -304,7 +306,7 @@ class McpHttpTests(LiveServerTestCase):
async def check(client):
names = {tool.name for tool in (await client.list_tools()).tools}
self.assertEqual(len(names), 44)
self.assertGreaterEqual(len(names), 44)
self.assertTrue({'food_lookup_product', 'food_create_product', 'food_import_product',
'inventory_import_groceries', 'recipe_cook_later_add',
'recipe_cook_later_remove', 'recipe_cook_later_list'} <= names)