Mercurial > libervia-backend
diff tests/unit/test_plugin_xep_0215.py @ 4321:2246eeeccc74
tests (unit): fix tests:
- test_ap-gateway: fix missing implementation of `client.is_local`
- test_plugin_xep_0215: fix missing return value of `has_feature`
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 30 Sep 2024 14:15:47 +0200 |
parents | 4b842c1fb686 |
children |
line wrap: on
line diff
--- a/tests/unit/test_plugin_xep_0215.py Mon Sep 30 14:14:38 2024 +0200 +++ b/tests/unit/test_plugin_xep_0215.py Mon Sep 30 14:15:47 2024 +0200 @@ -18,7 +18,7 @@ from twisted.internet import defer from pytest_twisted import ensureDeferred as ed -from unittest.mock import MagicMock +from unittest.mock import AsyncMock, MagicMock from libervia.backend.plugins.plugin_xep_0215 import XEP_0215 from libervia.backend.tools import xml_tools from twisted.words.protocols.jabber import jid @@ -28,6 +28,9 @@ def test_parse_services(self, host): """Services are parsed correctly""" xep_0215 = XEP_0215(host) + host.memory.disco.has_feature = AsyncMock() + host.memory.disco.has_feature.return_value = True + services_elt = xml_tools.parse( """