fix(tests/unit): do not attempt to call logout in check mode

This commit is contained in:
Johanna Dorothea Reichmann 2023-01-31 12:21:17 +01:00
parent fb0cee0053
commit 96751ecd1f
No known key found for this signature in database
GPG key ID: 03624C433676E465

View file

@ -145,7 +145,7 @@ class AnsibleNioModule:
return self.client.device_id
async def matrix_logout(self):
if self.client.logged_in:
if not self.module.check_mode and self.client.logged_in:
request = await self.client.logout()
if isinstance(request, LogoutError):
result = {"msg": request.message}