comparison tests/unit/conftest.py @ 4072:040095a5dc7f

refactoring: rename `SAT` class to `LiberviaBackend`
author Goffi <goffi@goffi.org>
date Fri, 02 Jun 2023 11:55:48 +0200
parents 4b842c1fb686
children 7c5654c54fed
comparison
equal deleted inserted replaced
4071:4b842c1fb686 4072:040095a5dc7f
19 from contextlib import contextmanager 19 from contextlib import contextmanager
20 from unittest.mock import MagicMock, AsyncMock 20 from unittest.mock import MagicMock, AsyncMock
21 from pytest import fixture 21 from pytest import fixture
22 from twisted.internet import defer 22 from twisted.internet import defer
23 from twisted.words.protocols.jabber import jid 23 from twisted.words.protocols.jabber import jid
24 from libervia.backend.core.sat_main import SAT 24 from libervia.backend.core.sat_main import LiberviaBackend
25 from libervia.backend.tools import async_trigger as trigger 25 from libervia.backend.tools import async_trigger as trigger
26 from libervia.backend.core import xmpp 26 from libervia.backend.core import xmpp
27 27
28 28
29 @fixture(scope="session") 29 @fixture(scope="session")
37 @fixture(scope="session") 37 @fixture(scope="session")
38 def storage(): 38 def storage():
39 return AsyncMock() 39 return AsyncMock()
40 40
41 41
42 class MockSAT(SAT): 42 class MockSAT(LiberviaBackend):
43 43
44 def __init__(self, bridge, storage): 44 def __init__(self, bridge, storage):
45 self._cb_map = {} 45 self._cb_map = {}
46 self._menus = {} 46 self._menus = {}
47 self._menus_paths = {} 47 self._menus_paths = {}