Skip to content

Commit

Permalink
Merge pull request #1812 from wger-project/dependabot/pip/openfoodfac…
Browse files Browse the repository at this point in the history
…ts-2.2.0

Bump openfoodfacts from 1.1.3 to 2.2.0
  • Loading branch information
rolandgeider authored Nov 9, 2024
2 parents d92bb66 + 671bd8e commit 43650af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions wger/nutrition/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,22 +151,21 @@ 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: '
'7908c204-907f-4b1e-ad4e-f482e9769ade)'
)
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()
Expand Down

0 comments on commit 43650af

Please sign in to comment.