openfoodfacts / openfoodfacts-dart

Open Food Facts API Wrapper
https://pub.dev/packages/openfoodfacts
Apache License 2.0
167 stars 67 forks source link

New Prices API in Django make some tests fail #970

Closed monsieurtanuki closed 2 months ago

monsieurtanuki commented 2 months ago

Description

cf. https://github.com/openfoodfacts/open-prices/issues/355 by @raphodn The Prices API has recently been refactored in Django. There are side-effects (e.g. tests now failing), cf. https://github.com/openfoodfacts/openfoodfacts-dart/actions/runs/10724138009/job/29739089653 To be solved in off-dart or in Prices. Or both.

Expected behavior

The Prices refactoring should have been transparent from off-dart. Working on this issue, we'll see how bad that is. May already have an impact on Prices for Smoothie.

cc. @teolemon @raphael0202

raphodn commented 2 months ago

started a PR here : https://github.com/openfoodfacts/open-prices/pull/426

For now fixes

To look into

Won't "fix"

monsieurtanuki commented 2 months ago

Thank you @raphodn for your first glance! I'll give you more details about the cryptic problems (e.g. the "true / false expected")

monsieurtanuki commented 2 months ago

@raphodn The recent changes seem to have a limited impact on Smoothie. The only one I detected was that the "top contributors" page doesn't work anymore. That said, it looks like you're still developing live while I'm checking the errors, which makes my analysis less easy (for instance, 'Authentication credentials were not provided.' instead of 'Invalid authentication credentials') (and in that case my version is more accurate)

Following is my analysis.

raphodn commented 2 months ago

Ok ~about to~ merged the PR, it will fix :

Need to look into :

In the wontfix :

monsieurtanuki commented 2 months ago

Fixed by #971.