From 671bd8e3f01c041f5213f5e3ea132ea3c98b0061 Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Sat, 9 Nov 2024 17:18:48 +0100 Subject: [PATCH] Fix test --- wger/nutrition/tests/test_tasks.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wger/nutrition/tests/test_tasks.py b/wger/nutrition/tests/test_tasks.py index 525873e95..535154a94 100644 --- a/wger/nutrition/tests/test_tasks.py +++ b/wger/nutrition/tests/test_tasks.py @@ -151,8 +151,6 @@ def test_download_ingredient_off(self, mock_logger, mock_from_json, mock_request ): result = fetch_ingredient_image(1) - # log1 = mock_logger.mock_calls[0] - # print(log1) mock_logger.assert_any_call('Fetching image for ingredient 1') mock_logger.assert_any_call( 'Trying to fetch image from OFF for Test ingredient 1 (UUID: ' @@ -160,13 +158,14 @@ def test_download_ingredient_off(self, mock_logger, mock_from_json, mock_request ) mock_logger.assert_any_call('Image successfully saved') + # print(mock_request.mock_calls) mock_request.assert_any_call( 'https://world.openfoodfacts.org/api/v2/product/5055365635003.json?fields=images,image_front_url', headers=wger_headers(), timeout=ANY, ) mock_request.assert_any_call( - 'https://openfoodfacts-images.s3.eu-west-3.amazonaws.com/data/123/456/789/0987/654321/12345.jpg', + 'https://openfoodfacts-images.s3.eu-west-3.amazonaws.com/data/123/456/789/0987654321/12345.jpg', headers=wger_headers(), ) mock_from_json.assert_called()