refactor: no import * in tests
This commit is contained in:
parent
85bc6f5301
commit
18dde97c8c
36 changed files with 102 additions and 66 deletions
|
@ -1,5 +1,6 @@
|
||||||
import time
|
import time
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
|
|
||||||
|
|
||||||
class TestEvents(SleekTest):
|
class TestEvents(SleekTest):
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# -*- encoding: utf8 -*-
|
# -*- encoding: utf8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
from sleekxmpp import JID, InvalidJID
|
from sleekxmpp import JID, InvalidJID
|
||||||
from sleekxmpp.jid import nodeprep
|
from sleekxmpp.jid import nodeprep
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
from sleekxmpp.xmlstream.stanzabase import ET, StanzaBase
|
from sleekxmpp.xmlstream.stanzabase import ET, StanzaBase
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
from sleekxmpp.xmlstream.stanzabase import ElementBase
|
from sleekxmpp.test import SleekTest
|
||||||
|
from sleekxmpp.xmlstream.stanzabase import ElementBase, register_stanza_plugin, ET
|
||||||
from sleekxmpp.thirdparty import OrderedDict
|
from sleekxmpp.thirdparty import OrderedDict
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
|
|
||||||
|
|
||||||
class TestErrorStanzas(SleekTest):
|
class TestErrorStanzas(SleekTest):
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp import Iq
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
import sleekxmpp.plugins.gmail_notify as gmail
|
import sleekxmpp.plugins.gmail_notify as gmail
|
||||||
|
from sleekxmpp.xmlstream import register_stanza_plugin, ET
|
||||||
|
|
||||||
|
|
||||||
class TestGmail(SleekTest):
|
class TestGmail(SleekTest):
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
from sleekxmpp.xmlstream.stanzabase import ET
|
from sleekxmpp.xmlstream.stanzabase import ET
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
from sleekxmpp.stanza.message import Message
|
from sleekxmpp.stanza.message import Message
|
||||||
from sleekxmpp.stanza.htmlim import HTMLIM
|
from sleekxmpp.stanza.htmlim import HTMLIM
|
||||||
|
from sleekxmpp.xmlstream import register_stanza_plugin
|
||||||
|
|
||||||
|
|
||||||
class TestMessageStanzas(SleekTest):
|
class TestMessageStanzas(SleekTest):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
from sleekxmpp.stanza.presence import Presence
|
import sleekxmpp
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
|
|
||||||
class TestPresenceStanzas(SleekTest):
|
class TestPresenceStanzas(SleekTest):
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
from sleekxmpp.stanza.roster import Roster
|
from sleekxmpp.test import SleekTest
|
||||||
|
from sleekxmpp.xmlstream import ET
|
||||||
|
|
||||||
|
|
||||||
class TestRosterStanzas(SleekTest):
|
class TestRosterStanzas(SleekTest):
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp import Message
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
from sleekxmpp.thirdparty import OrderedDict
|
from sleekxmpp.thirdparty import OrderedDict
|
||||||
|
|
||||||
import sleekxmpp.plugins.xep_0004 as xep_0004
|
import sleekxmpp.plugins.xep_0004 as xep_0004
|
||||||
|
from sleekxmpp.xmlstream import register_stanza_plugin
|
||||||
|
|
||||||
|
|
||||||
class TestDataForms(SleekTest):
|
class TestDataForms(SleekTest):
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp import Iq
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
import sleekxmpp.plugins.xep_0030 as xep_0030
|
import sleekxmpp.plugins.xep_0030 as xep_0030
|
||||||
|
from sleekxmpp.xmlstream import register_stanza_plugin
|
||||||
|
|
||||||
|
|
||||||
class TestDisco(SleekTest):
|
class TestDisco(SleekTest):
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp import Message
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
import sleekxmpp.plugins.xep_0033 as xep_0033
|
import sleekxmpp.plugins.xep_0033 as xep_0033
|
||||||
|
from sleekxmpp.xmlstream import register_stanza_plugin
|
||||||
|
|
||||||
|
|
||||||
class TestAddresses(SleekTest):
|
class TestAddresses(SleekTest):
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.exceptions import XMPPError
|
||||||
|
from sleekxmpp import Iq
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
from sleekxmpp.plugins.xep_0047 import Data
|
from sleekxmpp.plugins.xep_0047 import Data
|
||||||
|
from sleekxmpp.xmlstream import register_stanza_plugin, ET
|
||||||
|
|
||||||
|
|
||||||
class TestIBB(SleekTest):
|
class TestIBB(SleekTest):
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
from sleekxmpp import Iq
|
from sleekxmpp import Iq
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
from sleekxmpp.plugins.xep_0050 import Command
|
from sleekxmpp.plugins.xep_0050 import Command
|
||||||
|
from sleekxmpp.xmlstream import register_stanza_plugin
|
||||||
|
|
||||||
|
|
||||||
class TestAdHocCommandStanzas(SleekTest):
|
class TestAdHocCommandStanzas(SleekTest):
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
from sleekxmpp.plugins.xep_0059 import Set
|
from sleekxmpp.plugins.xep_0059 import Set
|
||||||
|
from sleekxmpp.xmlstream import ET
|
||||||
|
|
||||||
|
|
||||||
class TestSetStanzas(SleekTest):
|
class TestSetStanzas(SleekTest):
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
import sleekxmpp.plugins.xep_0004 as xep_0004
|
import sleekxmpp.plugins.xep_0004 as xep_0004
|
||||||
import sleekxmpp.plugins.xep_0060.stanza as pubsub
|
import sleekxmpp.plugins.xep_0060.stanza as pubsub
|
||||||
|
from sleekxmpp.xmlstream.stanzabase import ET
|
||||||
|
|
||||||
|
|
||||||
class TestPubsubStanzas(SleekTest):
|
class TestPubsubStanzas(SleekTest):
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp import Message
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
import sleekxmpp.plugins.xep_0085 as xep_0085
|
import sleekxmpp.plugins.xep_0085 as xep_0085
|
||||||
|
from sleekxmpp.xmlstream import register_stanza_plugin
|
||||||
|
|
||||||
|
|
||||||
class TestChatStates(SleekTest):
|
class TestChatStates(SleekTest):
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp import Message
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
import sleekxmpp.plugins.xep_0184 as xep_0184
|
import sleekxmpp.plugins.xep_0184 as xep_0184
|
||||||
|
from sleekxmpp.xmlstream import register_stanza_plugin
|
||||||
|
|
||||||
|
|
||||||
class TestReciept(SleekTest):
|
class TestReciept(SleekTest):
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import time
|
import time
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
|
|
||||||
|
|
||||||
class TestStreamTester(SleekTest):
|
class TestStreamTester(SleekTest):
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import sys
|
|
||||||
import sleekxmpp
|
|
||||||
from sleekxmpp.xmlstream.matcher import MatchXPath
|
from sleekxmpp.xmlstream.matcher import MatchXPath
|
||||||
from sleekxmpp.xmlstream.handler import Callback
|
from sleekxmpp.xmlstream.handler import Callback
|
||||||
from sleekxmpp.exceptions import XMPPError
|
from sleekxmpp.exceptions import XMPPError
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
|
|
||||||
|
|
||||||
class TestStreamExceptions(SleekTest):
|
class TestStreamExceptions(SleekTest):
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from sleekxmpp import Message
|
from sleekxmpp import Message
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
from sleekxmpp.xmlstream.handler import *
|
from sleekxmpp.test import SleekTest
|
||||||
from sleekxmpp.xmlstream.matcher import *
|
|
||||||
|
|
||||||
|
|
||||||
class TestFilters(SleekTest):
|
class TestFilters(SleekTest):
|
||||||
|
@ -84,5 +83,5 @@ class TestFilters(SleekTest):
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
suite = unittest.TestLoader().loadTestsFromTestCase(TestFilters)
|
suite = unittest.TestLoader().loadTestsFromTestCase(TestFilters)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from sleekxmpp import Message
|
import unittest
|
||||||
from sleekxmpp.test import *
|
from sleekxmpp.test import SleekTest
|
||||||
from sleekxmpp.xmlstream.handler import *
|
from sleekxmpp.exceptions import IqTimeout
|
||||||
from sleekxmpp.xmlstream.matcher import *
|
from sleekxmpp import Callback, MatchXPath
|
||||||
|
|
||||||
|
|
||||||
class TestHandlers(SleekTest):
|
class TestHandlers(SleekTest):
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import time
|
import time
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
|
|
||||||
|
|
||||||
class TestStreamPresence(SleekTest):
|
class TestStreamPresence(SleekTest):
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
# -*- encoding:utf-8 -*-
|
# -*- encoding:utf-8 -*-
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.exceptions import IqTimeout
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
import time
|
import time
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import sys
|
|
||||||
import time
|
import time
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
|
|
||||||
|
|
||||||
class TestStreamDisco(SleekTest):
|
class TestStreamDisco(SleekTest):
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
|
|
||||||
|
|
||||||
class TestInBandByteStreams(SleekTest):
|
class TestInBandByteStreams(SleekTest):
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import time
|
import time
|
||||||
import logging
|
import logging
|
||||||
import threading
|
|
||||||
|
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
|
from sleekxmpp.xmlstream import ElementBase, register_stanza_plugin
|
||||||
|
|
||||||
|
|
||||||
class TestAdHocCommands(SleekTest):
|
class TestAdHocCommands(SleekTest):
|
||||||
|
@ -35,7 +36,7 @@ class TestAdHocCommands(SleekTest):
|
||||||
logging.debug(initial)
|
logging.debug(initial)
|
||||||
new_payload = TestPayload()
|
new_payload = TestPayload()
|
||||||
if initial:
|
if initial:
|
||||||
new_payload['bar'] = 'Received: %s' % initial['bar']
|
new_payload['bar'] = 'Received: %s' % initial['bar']
|
||||||
else:
|
else:
|
||||||
new_payload['bar'] = 'Failed'
|
new_payload['bar'] = 'Failed'
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
from sleekxmpp.xmlstream import register_stanza_plugin
|
from sleekxmpp.xmlstream import register_stanza_plugin
|
||||||
from sleekxmpp.plugins.xep_0030 import DiscoItems
|
from sleekxmpp.plugins.xep_0030 import DiscoItems
|
||||||
from sleekxmpp.plugins.xep_0059 import ResultIterator, Set
|
from sleekxmpp.plugins.xep_0059 import ResultIterator, Set
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import sys
|
|
||||||
import time
|
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
from sleekxmpp.stanza.atom import AtomEntry
|
from sleekxmpp.stanza.atom import AtomEntry
|
||||||
from sleekxmpp.xmlstream import register_stanza_plugin
|
from sleekxmpp.xmlstream import register_stanza_plugin
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import time
|
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
|
|
||||||
|
|
||||||
class TestOOB(SleekTest):
|
class TestOOB(SleekTest):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import threading
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
|
|
||||||
|
|
||||||
class TestStreamChatStates(SleekTest):
|
class TestStreamChatStates(SleekTest):
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
|
from sleekxmpp.test import SleekTest
|
||||||
|
|
||||||
|
|
||||||
class TestStreamSet(SleekTest):
|
class TestStreamSet(SleekTest):
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
import sys
|
import unittest
|
||||||
import time
|
from sleekxmpp.test import SleekTest
|
||||||
import threading
|
|
||||||
|
|
||||||
from sleekxmpp.test import *
|
|
||||||
from sleekxmpp.xmlstream import ElementBase
|
|
||||||
|
|
||||||
|
|
||||||
class TestStreamExtendedDisco(SleekTest):
|
class TestStreamExtendedDisco(SleekTest):
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
import sys
|
|
||||||
import time
|
import time
|
||||||
import threading
|
|
||||||
|
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
from sleekxmpp.xmlstream import ElementBase
|
from sleekxmpp.test import SleekTest
|
||||||
|
|
||||||
|
|
||||||
class TestStreamDirectInvite(SleekTest):
|
class TestStreamDirectInvite(SleekTest):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from sleekxmpp.test import *
|
import unittest
|
||||||
from sleekxmpp.stanza import Message
|
from sleekxmpp.test import SleekTest
|
||||||
from sleekxmpp.xmlstream.stanzabase import ET, ElementBase
|
from sleekxmpp.xmlstream.stanzabase import ET
|
||||||
from sleekxmpp.xmlstream.tostring import tostring, escape
|
from sleekxmpp.xmlstream.tostring import tostring, escape
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue