Commit b4c645c
committed
fix: rebuild BackupManager when settings instance changes
Test fixtures that monkeypatch ENABLE_AUTO_BACKUP and reset the global
settings singleton get a new Settings instance back from
get_global_settings(). The cached BackupManager on the client object
holds a reference to the old (pre-reset) settings, so its 'enabled'
property keeps returning False even after the toggle is flipped.
get_backup_manager now compares mgr._settings is settings; mismatch
forces a rebuild. Production never hits this path (the settings
singleton is built once at startup); tests get a fresh manager after
each toggle.1 parent 8af7dc5 commit b4c645c
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
439 | 444 | | |
440 | 445 | | |
441 | | - | |
| 446 | + | |
442 | 447 | | |
443 | 448 | | |
444 | 449 | | |
| |||
0 commit comments