food logger context tips

This commit is contained in:
Joren de Graaf
2026-10-11 15:21:10 +02:00
parent 559c51e9bb
commit 400e8254c0
51 changed files with 1988 additions and 41 deletions
+1 -1
View File
@@ -69,6 +69,6 @@ class FoodExportTests(TestCase):
for index in range(8):
FoodLogEntry.objects.create(user=self.user, date=date(2026, 10, 3), meal=MealType.LUNCH,
product=self.product, product_name_snapshot=f'Food {index}', amount=100, unit=Unit.GRAM)
with self.assertNumQueries(2):
with self.assertNumQueries(3):
context = diary_context(self.user, date(2026, 10, 3))
self.assertEqual(len(context['meals'][1]['entries']), 8)