• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FlexMeasures / flexmeasures / 31953497598
84%

Build:
DEFAULT BRANCH: main
Ran 16 Aug 2026 02:53PM UTC
Jobs 1
Files 176
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Aug 2026 02:42PM UTC coverage: 84.09% (+0.005%) from 84.085%
31953497598

push

github

web-flow
fix(tests): clear cached login user between tests (#2424)

* fix(tests): clear cached login user between tests

* tests/conftest: also clear flask-security's cached auth state

Context:
- Clearing flask-login's `_login_user` on its own broke 29 tests, because flask-security caches companion state on the same `g`.
- Its request loader short-circuits on `fs_authn_via` and then returns `g._login_user` unguarded, so with only `_login_user` gone the next token-authenticated request raised AttributeError and returned a 500.

Change:
- Clear `fs_authn_via`, `fs_paa` and `csrf_valid` alongside `_login_user`, and name the set so the reason they belong together is recorded.
- In the regression test, import `g` at module level, cover all four keys, and assert the state survives the request context, so the test pair cannot silently stop testing anything.

Signed-off-by: F.N. Claessen <felix@seita.nl>

* api/v3_0: authenticate the all-three-endpoints annotation test as an admin

Context:
- test_post_annotation_all_three_endpoints asserts 201 for creating an account annotation as test_supplier_user_4, who has no account-admin role, and the file's own permission test expects 403 for exactly that case.
- It has been failing in isolation ever since it was added, and only passed in a full run because an earlier test's admin login leaked in through the cached auth state that this branch now clears.

Change:
- Authenticate as test_admin_user, who may annotate any account, asset and sensor, and say so in the docstring.

Signed-off-by: F.N. Claessen <felix@seita.nl>

* docs: point the changelog entry at the PR

Context:
- The entry linked the issue rather than the PR, unlike every neighbouring entry.

Change:
- Reference PR #2424, and reword slightly now that flask-security's cached state is cleared alongside flask-login's.

Signed-off-by: F.N. Claessen <felix@seita.nl>

---------

Signed-off-by: F.N. Claessen <felix@seita.nl>
Co-authored-by: F.N. Claessen <felix@seita.nl>

7 of 7 new or added lines in 1 file covered. (100.0%)

17346 of 20628 relevant lines covered (84.09%)

0.84 hits per line

Jobs
ID Job ID Ran Files Coverage
1 31953497598.1 16 Aug 2026 02:53PM UTC 176
84.09
GitHub Action Run
Source Files on build 31953497598
  • Tree
  • List 176
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #31953497598
  • 6fb175da on github
  • Prev Build on main (#31833786234)
  • Next Build on main (#31967587727)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc