tests (unit/email gateway): Fix tests
This commit is contained in:
parent
c89b91c2e9
commit
c10c34304a
1 changed files with 13 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ from email.utils import formataddr
|
|||
from unittest.mock import AsyncMock, MagicMock
|
||||
|
||||
import pytest
|
||||
from pytest import fixture
|
||||
from pytest_twisted import ensureDeferred as ed
|
||||
from twisted.words.protocols.jabber import jid
|
||||
from tx_xmpp import disco
|
||||
|
|
@ -41,6 +42,18 @@ from libervia.backend.plugins.plugin_comp_email_gateway.pubsub_service import (
|
|||
NODE_OPTIONS,
|
||||
)
|
||||
from libervia.backend.plugins.plugin_xep_0131 import HeadersData, Urgency
|
||||
from libervia.backend.plugins.plugin_xep_0496 import XEP_0496
|
||||
from libervia.backend.plugins.plugin_xep_0499 import XEP_0499
|
||||
|
||||
|
||||
@fixture(autouse=True)
|
||||
def setup_xep_0496_and_0499(host):
|
||||
"""Mock XEP-0496 and XEP-0499 plugins needed for EmailGatewayComponent initialization."""
|
||||
xep_0496 = XEP_0496(host)
|
||||
host.plugins["XEP-0496"] = xep_0496
|
||||
xep_0499 = XEP_0499(host)
|
||||
host.plugins["XEP-0499"] = xep_0499
|
||||
return xep_0499
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
|||
Loading…
Reference in a new issue