From 007712f43dec91c3daa2578471be8fa99e3e89c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 23:23:09 +0000 Subject: [PATCH 1/2] Bump openfoodfacts from 1.1.3 to 2.2.0 Bumps [openfoodfacts](https://github.com/openfoodfacts/openfoodfacts-python) from 1.1.3 to 2.2.0. - [Release notes](https://github.com/openfoodfacts/openfoodfacts-python/releases) - [Changelog](https://github.com/openfoodfacts/openfoodfacts-python/blob/develop/CHANGELOG.md) - [Commits](https://github.com/openfoodfacts/openfoodfacts-python/compare/v1.1.3...v2.2.0) --- updated-dependencies: - dependency-name: openfoodfacts dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a5d0c1980..ae9906a13 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,7 +25,7 @@ flower==2.0.1 fontawesomefree~=6.6.0 icalendar==6.0.1 invoke==2.2.0 -openfoodfacts==1.1.3 +openfoodfacts==2.2.0 pillow==10.4.0 reportlab==4.2.5 requests==2.32.3 From 671bd8e3f01c041f5213f5e3ea132ea3c98b0061 Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Sat, 9 Nov 2024 17:18:48 +0100 Subject: [PATCH 2/2] 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()