diff options
| author | Joseph Sutton <josephsutton@catalyst.net.nz> | 2023-05-25 12:20:06 +1200 |
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2023-05-29 22:32:28 +0000 |
| commit | 6d68ef23b3280675d45eb85db7653f2bceaf10c7 (patch) | |
| tree | a8a2c72fab2aa82c1e820cfaab6314f5894ab4e5 /python/samba | |
| parent | 4cb869dce44b9397cb34f34a918e1bcda8c61223 (diff) | |
| download | samba-6d68ef23b3280675d45eb85db7653f2bceaf10c7.tar.gz samba-6d68ef23b3280675d45eb85db7653f2bceaf10c7.tar.bz2 samba-6d68ef23b3280675d45eb85db7653f2bceaf10c7.zip | |
tests/audit_log: Remove unnecessary checks
These attributes are always truthy.
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba')
| -rw-r--r-- | python/samba/tests/audit_log_base.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/python/samba/tests/audit_log_base.py b/python/samba/tests/audit_log_base.py index 621e51da372..50b941270fe 100644 --- a/python/samba/tests/audit_log_base.py +++ b/python/samba/tests/audit_log_base.py @@ -126,12 +126,10 @@ class AuditLogTestBase(samba.tests.TestCase): self.discardMessages() self.msg_ctx.irpc_remove_name(self.event_type) self.msg_ctx.irpc_remove_name(AUTH_EVENT_NAME) - if self.msg_handler_and_context: - self.msg_ctx.deregister(self.msg_handler_and_context, - msg_type=self.message_type) - if self.auth_handler_and_context: - self.msg_ctx.deregister(self.auth_handler_and_context, - msg_type=MSG_AUTH_LOG) + self.msg_ctx.deregister(self.msg_handler_and_context, + msg_type=self.message_type) + self.msg_ctx.deregister(self.auth_handler_and_context, + msg_type=MSG_AUTH_LOG) def haveExpected(self, expected, dn): if dn is None: |
