summaryrefslogtreecommitdiff
path: root/sleekxmpp/test
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-07-24 20:01:18 -0700
committerLance Stout <lancestout@gmail.com>2012-07-24 20:01:18 -0700
commitc42f1ad4c79863261977a9c5ea3b33be0b51b946 (patch)
tree8eee86ddb082f51dea0866f16146bcd1f4f13c1f /sleekxmpp/test
parenta3ec1af2053bc0be4864ae290e6e5fc39f3fd5fe (diff)
parent9d8de7fc15afc39a666d2ac16b62a068dfc55112 (diff)
downloadslixmpp-c42f1ad4c79863261977a9c5ea3b33be0b51b946.tar.gz
slixmpp-c42f1ad4c79863261977a9c5ea3b33be0b51b946.tar.bz2
slixmpp-c42f1ad4c79863261977a9c5ea3b33be0b51b946.tar.xz
slixmpp-c42f1ad4c79863261977a9c5ea3b33be0b51b946.zip
Merge branch 'master' into develop
Diffstat (limited to 'sleekxmpp/test')
-rw-r--r--sleekxmpp/test/livesocket.py10
-rw-r--r--sleekxmpp/test/mocksocket.py10
-rw-r--r--sleekxmpp/test/sleektest.py7
3 files changed, 10 insertions, 17 deletions
diff --git a/sleekxmpp/test/livesocket.py b/sleekxmpp/test/livesocket.py
index 80d63307..d70ee4eb 100644
--- a/sleekxmpp/test/livesocket.py
+++ b/sleekxmpp/test/livesocket.py
@@ -8,10 +8,8 @@
import socket
import threading
-try:
- import queue
-except ImportError:
- import Queue as queue
+
+from sleekxmpp.util import Queue
class TestLiveSocket(object):
@@ -39,8 +37,8 @@ class TestLiveSocket(object):
"""
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.recv_buffer = []
- self.recv_queue = queue.Queue()
- self.send_queue = queue.Queue()
+ self.recv_queue = Queue()
+ self.send_queue = Queue()
self.send_queue_lock = threading.Lock()
self.recv_queue_lock = threading.Lock()
self.is_live = True
diff --git a/sleekxmpp/test/mocksocket.py b/sleekxmpp/test/mocksocket.py
index 0920b7ea..4c9d1699 100644
--- a/sleekxmpp/test/mocksocket.py
+++ b/sleekxmpp/test/mocksocket.py
@@ -7,10 +7,8 @@
"""
import socket
-try:
- import queue
-except ImportError:
- import Queue as queue
+
+from sleekxmpp.util import Queue
class TestSocket(object):
@@ -36,8 +34,8 @@ class TestSocket(object):
Same as arguments for socket.socket
"""
self.socket = socket.socket(*args, **kwargs)
- self.recv_queue = queue.Queue()
- self.send_queue = queue.Queue()
+ self.recv_queue = Queue()
+ self.send_queue = Queue()
self.is_live = False
self.disconnected = False
diff --git a/sleekxmpp/test/sleektest.py b/sleekxmpp/test/sleektest.py
index cac99f77..47af86cf 100644
--- a/sleekxmpp/test/sleektest.py
+++ b/sleekxmpp/test/sleektest.py
@@ -8,13 +8,10 @@
import unittest
from xml.parsers.expat import ExpatError
-try:
- import Queue as queue
-except:
- import queue
import sleekxmpp
from sleekxmpp import ClientXMPP, ComponentXMPP
+from sleekxmpp.util import Queue
from sleekxmpp.stanza import Message, Iq, Presence
from sleekxmpp.test import TestSocket, TestLiveSocket
from sleekxmpp.exceptions import XMPPError, IqTimeout, IqError
@@ -338,7 +335,7 @@ class SleekTest(unittest.TestCase):
# We will use this to wait for the session_start event
# for live connections.
- skip_queue = queue.Queue()
+ skip_queue = Queue()
if socket == 'mock':
self.xmpp.set_socket(TestSocket())