You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[tests] Fix deactivation test to exercise correct code path openwisp#1221
test_deactivation_fires_post_delete_signals was calling
device.config.templates.clear() directly without first setting the
config status to deactivating. This meant the per-instance delete
path guarded by is_deactivating_or_deactivated() in manage_vpn_clients
was never exercised, defeating the purpose of the regression test.
Replace templates.clear() with device.deactivate() which sets the
status to deactivating before clearing templates. Also replace
global IP count checks with object-level assertions, remove the
unused cert variable (F841), and replace the misleading
"certificate revoked for OpenVPN-style auto_cert" subTest with a
WireGuard-appropriate post_delete handler check.
Related to openwisp#1221
0 commit comments