recipe links

This commit is contained in:
Joren de Graaf
2026-10-23 14:30:58 +02:00
parent 5b986134be
commit 4d76a2bc9c
52 changed files with 2698 additions and 19 deletions
+15
View File
@@ -246,6 +246,21 @@ class McpHttpTests(LiveServerTestCase):
asyncio.run(self._client(self.secret, check))
self.assertEqual(KitchenInventoryItem.objects.filter(pk__in=[item.pk for item in items], archived_at__isnull=False).count(), 2)
def test_inventory_bulk_update_handles_twenty_three_rows_in_one_call(self):
location = InventoryLocation.objects.create(user=self.a, name='Pantry')
items = [KitchenInventoryItem.objects.create(user=self.a, product=self.a_product, location=location)
for _ in range(23)]
async def check(client):
request = {'items': [{'item_id': str(item.api_id), 'changes': {'notes': 'Audited'}} for item in items],
'dry_run': False, 'atomic': True, 'idempotency_key': 'mcp-bulk-23'}
result = (await client.call_tool('inventory_bulk_update', request)).structured_content
self.assertEqual(result['counts']['changed'], 23)
self.assertEqual(result['status'], 'success')
asyncio.run(self._client(self.secret, check))
self.assertEqual(KitchenInventoryItem.objects.filter(user=self.a, notes='Audited').count(), 23)
def test_oauth_issued_pat_authenticates_mcp_with_journal_upgrade(self):
application = Application.objects.create(user=self.a, name='Test ChatGPT style client',
client_type=Application.CLIENT_PUBLIC, authorization_grant_type=Application.GRANT_AUTHORIZATION_CODE,