python: tests: addCleanup is always before create operation
authorRob van der Linde <rob@catalyst.net.nz>
Wed, 25 Oct 2023 03:02:31 +0000 (16:02 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 26 Oct 2023 23:32:34 +0000 (23:32 +0000)
commite87d74066af3b552333aa28d4180e11b32e465b9
tree6f9d27fdf7d94c992961b2b7aa02e5ddad317c6a
parentd19e268221efca4079469c015f0fe3f2d0719f23
python: tests: addCleanup is always before create operation

This way if it raises during a create, it will still end up running the cleanup.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/samba_tool/domain_auth_policy.py
python/samba/tests/samba_tool/domain_auth_silo.py