diff options
author | Philipp Hörist <philipp@hoerist.com> | 2019-03-03 21:29:29 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2019-03-03 21:29:29 +0300 |
commit | fe2e49d2fe15a51cf864e81feb94ac715a72fe9b (patch) | |
tree | 16f5c1db5d4b0fa506c7b60edfe1ee4d0988382d /test | |
parent | 7d1b7f39a865ccc6544440f5ecd3d9ea8f67f0af (diff) | |
parent | 09b64b9f50590891902b38356c82722581eef2c8 (diff) |
Merge branch 'removeSuffix' into 'master'
Remove "_nb" suffix
See merge request gajim/python-nbxmpp!30
Diffstat (limited to 'test')
-rw-r--r-- | test/broken/test_xmpp_smacks.py | 4 | ||||
-rw-r--r-- | test/unit/test_xml_vulnerability.py | 4 | ||||
-rw-r--r-- | test/unit/test_xmpp_client.py (renamed from test/unit/test_xmpp_client_nb.py) | 6 | ||||
-rw-r--r-- | test/unit/test_xmpp_dispatcher.py (renamed from test/unit/test_xmpp_dispatcher_nb.py) | 6 | ||||
-rw-r--r-- | test/unit/test_xmpp_transports.py (renamed from test/unit/test_xmpp_transports_nb.py) | 6 | ||||
-rw-r--r-- | test/unit/test_xmpp_transports2.py (renamed from test/unit/test_xmpp_transports_nb2.py) | 6 |
6 files changed, 16 insertions, 16 deletions
diff --git a/test/broken/test_xmpp_smacks.py b/test/broken/test_xmpp_smacks.py index fa66065..4ccd704 100644 --- a/test/broken/test_xmpp_smacks.py +++ b/test/broken/test_xmpp_smacks.py @@ -4,7 +4,7 @@ Tests for smacks.py Stream Management import unittest from unittest.mock import Mock -from nbxmpp import dispatcher_nb +from nbxmpp import dispatcher from nbxmpp import protocol from nbxmpp import smacks @@ -14,7 +14,7 @@ class TestDispatcherNB(unittest.TestCase): into a mock client ''' def setUp(self): - self.dispatcher = dispatcher_nb.XMPPDispatcher() + self.dispatcher = dispatcher.XMPPDispatcher() # Setup mock client self.client = Mock() diff --git a/test/unit/test_xml_vulnerability.py b/test/unit/test_xml_vulnerability.py index 7a8cb7a..dcb0a7d 100644 --- a/test/unit/test_xml_vulnerability.py +++ b/test/unit/test_xml_vulnerability.py @@ -1,7 +1,7 @@ import unittest from unittest.mock import Mock -from nbxmpp import dispatcher_nb +from nbxmpp import dispatcher class XMLVulnerability(unittest.TestCase): @@ -9,7 +9,7 @@ class XMLVulnerability(unittest.TestCase): def setUp(self): self.client = Mock() self.client.Connection = Mock() - self.dispatcher = dispatcher_nb.XMPPDispatcher() + self.dispatcher = dispatcher.XMPPDispatcher() self.dispatcher.PlugIn(self.client) self.dispatcher.StreamInit() diff --git a/test/unit/test_xmpp_client_nb.py b/test/unit/test_xmpp_client.py index 8a8cb7b..f2f0c5f 100644 --- a/test/unit/test_xmpp_client_nb.py +++ b/test/unit/test_xmpp_client.py @@ -1,5 +1,5 @@ ''' -Testing script for NonBlockingClient class (src/common/xmpp/client_nb.py) +Testing script for NonBlockingClient class (nbxmpp/client.py) It actually connects to a xmpp server. ''' @@ -9,7 +9,7 @@ from unittest.mock import Mock from test.lib.xmpp_mocks import MockConnection, IdleQueueThread -from nbxmpp import client_nb +from nbxmpp import client # (XMPP server hostname, c2s port). Script will connect to the machine. xmpp_server_port = ('gajim.org', 5222) @@ -54,7 +54,7 @@ class TestNonBlockingClient(unittest.TestCase): def on_connect_failure(self): pass - self.client = client_nb.NonBlockingClient( + self.client = client.NonBlockingClient( domain=server_port[0], idlequeue=self.idlequeue_thread.iq, caller=Mock(spec=TempConnection)) diff --git a/test/unit/test_xmpp_dispatcher_nb.py b/test/unit/test_xmpp_dispatcher.py index 8b7d528..bf66db9 100644 --- a/test/unit/test_xmpp_dispatcher_nb.py +++ b/test/unit/test_xmpp_dispatcher.py @@ -1,12 +1,12 @@ ''' -Tests for dispatcher_nb.py +Tests for dispatcher.py ''' import unittest from unittest.mock import Mock from test import lib -from nbxmpp import dispatcher_nb +from nbxmpp import dispatcher from nbxmpp import protocol from nbxmpp.protocol import JID @@ -17,7 +17,7 @@ class TestDispatcherNB(unittest.TestCase): into a mock client ''' def setUp(self): - self.dispatcher = dispatcher_nb.XMPPDispatcher() + self.dispatcher = dispatcher.XMPPDispatcher() # Setup mock client self.client = Mock() diff --git a/test/unit/test_xmpp_transports_nb.py b/test/unit/test_xmpp_transports.py index 0f60737..e79854b 100644 --- a/test/unit/test_xmpp_transports_nb.py +++ b/test/unit/test_xmpp_transports.py @@ -4,7 +4,7 @@ Unit test for tranports classes. import unittest -from nbxmpp import transports_nb +from nbxmpp import transports class TestModuleLevelFunctions(unittest.TestCase): @@ -13,7 +13,7 @@ class TestModuleLevelFunctions(unittest.TestCase): ''' def test_urisplit(self): def check_uri(uri, proto, host, port, path): - _proto, _host, _port, _path = transports_nb.urisplit(uri) + _proto, _host, _port, _path = transports.urisplit(uri) self.assertEqual(proto, _proto) self.assertEqual(host, _host) self.assertEqual(path, _path) @@ -30,7 +30,7 @@ class TestModuleLevelFunctions(unittest.TestCase): def test_get_proxy_data_from_dict(self): def check_dict(proxy_dict, host, port, user, passwd): - _host, _port, _user, _passwd = transports_nb.get_proxy_data_from_dict( + _host, _port, _user, _passwd = transports.get_proxy_data_from_dict( proxy_dict) self.assertEqual(_host, host) self.assertEqual(_port, port) diff --git a/test/unit/test_xmpp_transports_nb2.py b/test/unit/test_xmpp_transports2.py index 7caeda8..0bdd721 100644 --- a/test/unit/test_xmpp_transports_nb2.py +++ b/test/unit/test_xmpp_transports2.py @@ -7,7 +7,7 @@ import unittest import socket from test.lib.xmpp_mocks import IdleQueueThread, IdleMock -from nbxmpp import transports_nb +from nbxmpp import transports class AbstractTransportTest(unittest.TestCase): @@ -72,7 +72,7 @@ class TestNonBlockingTCP(AbstractTransportTest): except socket.error as e: self.testcase.fail(msg=str(e)) - self.socket = transports_nb.NonBlockingTCP( + self.socket = transports.NonBlockingTCP( raise_event=lambda event_type, data: self.testcase.assertTrue( event_type and data), on_disconnect=lambda: self.on_success(mode='SocketDisconnect'), @@ -210,7 +210,7 @@ class TestNonBlockingHTTP(AbstractTransportTest): } def _get_transport(self, http_dict, proxy_dict=None): - return transports_nb.NonBlockingHTTP( + return transports.NonBlockingHTTP( raise_event=None, on_disconnect=None, idlequeue=self.idlequeue_thread.iq, |