Mercurial > libervia-backend
comparison libervia/backend/test/helpers.py @ 4107:bc7d45dedeb0
backend: rename `SatRosterProtocol` to `LiberviaRosterProtocol`
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 30 Jun 2023 15:11:05 +0200 |
parents | 15055a00162c |
children | 0d7bb4df2343 |
comparison
equal
deleted
inserted
replaced
4106:4ad982a0358f | 4107:bc7d45dedeb0 |
---|---|
29 from libervia.backend.core import exceptions | 29 from libervia.backend.core import exceptions |
30 from libervia.backend.tools import config as tools_config | 30 from libervia.backend.tools import config as tools_config |
31 from .constants import Const as C | 31 from .constants import Const as C |
32 from wokkel.xmppim import RosterItem | 32 from wokkel.xmppim import RosterItem |
33 from wokkel.generic import parseXml | 33 from wokkel.generic import parseXml |
34 from libervia.backend.core.xmpp import SatRosterProtocol | 34 from libervia.backend.core.xmpp import LiberviaRosterProtocol |
35 from libervia.backend.memory.memory import Params, Memory | 35 from libervia.backend.memory.memory import Params, Memory |
36 from twisted.trial.unittest import FailTest | 36 from twisted.trial.unittest import FailTest |
37 from twisted.trial import unittest | 37 from twisted.trial import unittest |
38 from twisted.internet import defer | 38 from twisted.internet import defer |
39 from twisted.words.protocols.jabber.jid import JID | 39 from twisted.words.protocols.jabber.jid import JID |
349 def point(self, point_name, *args, **kwargs): | 349 def point(self, point_name, *args, **kwargs): |
350 """We always return true to continue the action""" | 350 """We always return true to continue the action""" |
351 return True | 351 return True |
352 | 352 |
353 | 353 |
354 class FakeRosterProtocol(SatRosterProtocol): | 354 class FakeRosterProtocol(LiberviaRosterProtocol): |
355 """This class is used by FakeClient (one instance per profile)""" | 355 """This class is used by FakeClient (one instance per profile)""" |
356 | 356 |
357 def __init__(self, host, parent): | 357 def __init__(self, host, parent): |
358 SatRosterProtocol.__init__(self, host) | 358 LiberviaRosterProtocol.__init__(self, host) |
359 self.parent = parent | 359 self.parent = parent |
360 self._jids = {} | 360 self._jids = {} |
361 self.add_item(parent.jid.userhostJID()) | 361 self.add_item(parent.jid.userhostJID()) |
362 | 362 |
363 def add_item(self, jid, *args, **kwargs): | 363 def add_item(self, jid, *args, **kwargs): |