Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: failing API tests when run in isolation #1298

Open
Flix6x opened this issue Dec 24, 2024 · 0 comments
Open

bug: failing API tests when run in isolation #1298

Flix6x opened this issue Dec 24, 2024 · 0 comments
Labels
API bug Something isn't working

Comments

@Flix6x
Copy link
Contributor

Flix6x commented Dec 24, 2024

In case anyone is having trouble running a flexmeasures API test in isolation due to some UNAUTHORIZED error (e.g. with pytest -k test_trigger_and_get_schedule)? There appears to be some unwanted dependency between API tests. A silly but effective workaround is to rename the test you want to run in isolation by prepending test_auth_token and running pytest -k test_auth_token instead. This then runs both the test_auth_token and the actual test you wanted to run in isolation. For example, update def test_trigger_and_get_schedule to def test_auth_token_test_trigger_and_get_schedule. There appears to be something in test_auth_token that other tests need.

The test suite is unaffected by this bug.

@Flix6x Flix6x added bug Something isn't working API labels Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant