Fix imports

dispatcher_nb was renamed in nbxmpp
This commit is contained in:
Philipp Hörist 2019-03-03 19:40:39 +01:00
parent c58c7cc4a0
commit 94eef409db
4 changed files with 7 additions and 7 deletions

View File

@ -1071,7 +1071,7 @@ class Connection(CommonConnection, ConnectionHandlers):
con.set_resume_data(self._sm_resume_data)
# increase default timeout for server responses
nbxmpp.dispatcher_nb.DEFAULT_TIMEOUT_SECONDS = \
nbxmpp.dispatcher.DEFAULT_TIMEOUT_SECONDS = \
self.try_connecting_for_foo_secs
# FIXME: this is a hack; need a better way
if self.on_connect_success == self._on_new_account: # pylint: disable=comparison-with-callable

View File

@ -26,7 +26,7 @@ from random import Random
from unittest.mock import Mock
import nbxmpp
from nbxmpp import dispatcher_nb
from nbxmpp import dispatcher
from nbxmpp import simplexml
from nbxmpp.structs import StanzaHandler
from nbxmpp.plugin import PlugIn
@ -231,7 +231,7 @@ class P2PClient(IdleObject):
def on_connect(self, conn):
self.Connection = conn
self.Connection.PlugIn(self)
dispatcher_nb.Dispatcher().PlugIn(self)
dispatcher.Dispatcher().PlugIn(self)
self._register_handlers()
def StreamInit(self):

View File

@ -1,5 +1,5 @@
'''
Tests for dispatcher_nb.py
Tests for dispatcher.py
'''
import unittest
@ -9,7 +9,7 @@ lib.setup_env()
from mock import Mock
from gajim.common.protocol.bytestream import ConnectionIBBytestream, ConnectionSocks5Bytestream
from nbxmpp import dispatcher_nb
from nbxmpp import dispatcher
from nbxmpp import protocol
from gajim.common.jingle import ConnectionJingle
from gajim.common import app
@ -79,7 +79,7 @@ class Connection(Mock, ConnectionJingle, ConnectionSocks5Bytestream,
class TestJingle(unittest.TestCase):
def setUp(self):
self.dispatcher = dispatcher_nb.XMPPDispatcher()
self.dispatcher = dispatcher.XMPPDispatcher()
app.nec = Mock()
app.socks5queue = SocksQueue(Mock())
# Setup mock client

View File

@ -1,5 +1,5 @@
'''
Tests for dispatcher_nb.py
Tests for dispatcher.py
'''
import unittest