mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-19 20:55:14 +02:00
pytest 9.2 reads the old value of a monkeypatched attribute from the instance __dict__. Starlette State keeps attributes in an internal dict, so the old value looks unset and the teardown deletes the attribute for the rest of the test session. The first test that touches app.state.exiting passes but removes it, and every later monkeypatch.setattr on it fails with AttributeError. Use plain assignments instead.