diff options
author | lovetox <philipp@hoerist.com> | 2020-04-19 21:33:55 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2020-04-19 21:33:55 +0300 |
commit | db7b78d5f350017792b250e111f5e3eaabfa9d98 (patch) | |
tree | de0836071028b511c817fc86c8c1d7ab651be417 /test | |
parent | 7712aa5914d1021a6ef4722e1fe454688bb71cb1 (diff) |
Use namespaces module
Diffstat (limited to 'test')
-rw-r--r-- | test/lib/util.py | 1 | ||||
-rw-r--r-- | test/unit/test_activity.py | 4 | ||||
-rw-r--r-- | test/unit/test_avatar.py | 4 | ||||
-rw-r--r-- | test/unit/test_bookmarks.py | 6 | ||||
-rw-r--r-- | test/unit/test_location.py | 4 | ||||
-rw-r--r-- | test/unit/test_mood.py | 4 | ||||
-rw-r--r-- | test/unit/test_pubsub.py | 8 | ||||
-rw-r--r-- | test/unit/test_tune.py | 4 |
8 files changed, 17 insertions, 18 deletions
diff --git a/test/lib/util.py b/test/lib/util.py index 9caeddf..1fbe634 100644 --- a/test/lib/util.py +++ b/test/lib/util.py @@ -4,7 +4,6 @@ from unittest.mock import Mock from test.lib.const import STREAM_START from nbxmpp.dispatcher import StanzaDispatcher -from nbxmpp.protocol import NS_CLIENT from nbxmpp.protocol import JID diff --git a/test/unit/test_activity.py b/test/unit/test_activity.py index 3cf0af3..95052bb 100644 --- a/test/unit/test_activity.py +++ b/test/unit/test_activity.py @@ -1,6 +1,6 @@ from test.lib.util import StanzaHandlerTest -from nbxmpp.protocol import NS_PUBSUB_EVENT +from nbxmpp.namespaces import Namespace from nbxmpp.structs import StanzaHandler from nbxmpp.structs import ActivityData from nbxmpp.structs import PubSubEventData @@ -48,6 +48,6 @@ class ActivityTest(StanzaHandlerTest): self.dispatcher.register_handler( *StanzaHandler(name='message', callback=_on_message, - ns=NS_PUBSUB_EVENT)) + ns=Namespace.PUBSUB_EVENT)) self.dispatcher.process_data(event) diff --git a/test/unit/test_avatar.py b/test/unit/test_avatar.py index 70de7f3..be12185 100644 --- a/test/unit/test_avatar.py +++ b/test/unit/test_avatar.py @@ -1,6 +1,6 @@ from test.lib.util import StanzaHandlerTest -from nbxmpp.protocol import NS_PUBSUB_EVENT +from nbxmpp.namespaces import Namespace from nbxmpp.structs import StanzaHandler from nbxmpp.structs import AvatarMetaData from nbxmpp.structs import PubSubEventData @@ -53,6 +53,6 @@ class AvatarTest(StanzaHandlerTest): self.dispatcher.register_handler( *StanzaHandler(name='message', callback=_on_message, - ns=NS_PUBSUB_EVENT)) + ns=Namespace.PUBSUB_EVENT)) self.dispatcher.process_data(event) diff --git a/test/unit/test_bookmarks.py b/test/unit/test_bookmarks.py index d581dc1..edfa6f4 100644 --- a/test/unit/test_bookmarks.py +++ b/test/unit/test_bookmarks.py @@ -1,6 +1,6 @@ from test.lib.util import StanzaHandlerTest -from nbxmpp.protocol import NS_PUBSUB_EVENT +from nbxmpp.namespaces import Namespace from nbxmpp.protocol import JID from nbxmpp.structs import StanzaHandler from nbxmpp.structs import BookmarkData @@ -64,7 +64,7 @@ class BookmarkTest(StanzaHandlerTest): self.dispatcher.register_handler( *StanzaHandler(name='message', callback=_on_message, - ns=NS_PUBSUB_EVENT)) + ns=Namespace.PUBSUB_EVENT)) self.dispatcher.process_data(event) @@ -109,6 +109,6 @@ class BookmarkTest(StanzaHandlerTest): self.dispatcher.register_handler( *StanzaHandler(name='message', callback=_on_message, - ns=NS_PUBSUB_EVENT)) + ns=Namespace.PUBSUB_EVENT)) self.dispatcher.process_data(event) diff --git a/test/unit/test_location.py b/test/unit/test_location.py index fe1cd5d..cb9de94 100644 --- a/test/unit/test_location.py +++ b/test/unit/test_location.py @@ -1,6 +1,6 @@ from test.lib.util import StanzaHandlerTest -from nbxmpp.protocol import NS_PUBSUB_EVENT +from nbxmpp.namespaces import Namespace from nbxmpp.structs import StanzaHandler from nbxmpp.structs import LocationData from nbxmpp.structs import PubSubEventData @@ -89,6 +89,6 @@ class LocationTest(StanzaHandlerTest): self.dispatcher.register_handler( *StanzaHandler(name='message', callback=_on_message, - ns=NS_PUBSUB_EVENT)) + ns=Namespace.PUBSUB_EVENT)) self.dispatcher.process_data(event) diff --git a/test/unit/test_mood.py b/test/unit/test_mood.py index af184a8..065bddb 100644 --- a/test/unit/test_mood.py +++ b/test/unit/test_mood.py @@ -1,6 +1,6 @@ from test.lib.util import StanzaHandlerTest -from nbxmpp.protocol import NS_PUBSUB_EVENT +from nbxmpp.namespaces import Namespace from nbxmpp.structs import StanzaHandler from nbxmpp.structs import MoodData from nbxmpp.structs import PubSubEventData @@ -44,6 +44,6 @@ class MoodTest(StanzaHandlerTest): self.dispatcher.register_handler( *StanzaHandler(name='message', callback=_on_message, - ns=NS_PUBSUB_EVENT)) + ns=Namespace.PUBSUB_EVENT)) self.dispatcher.process_data(event) diff --git a/test/unit/test_pubsub.py b/test/unit/test_pubsub.py index 281383d..6cdca53 100644 --- a/test/unit/test_pubsub.py +++ b/test/unit/test_pubsub.py @@ -1,6 +1,6 @@ from test.lib.util import StanzaHandlerTest -from nbxmpp.protocol import NS_PUBSUB_EVENT +from nbxmpp.namespaces import Namespace from nbxmpp.structs import StanzaHandler from nbxmpp.structs import PubSubEventData @@ -32,7 +32,7 @@ class PubsubTest(StanzaHandlerTest): self.dispatcher.register_handler( *StanzaHandler(name='message', callback=_on_message, - ns=NS_PUBSUB_EVENT, + ns=Namespace.PUBSUB_EVENT, priority=16)) self.dispatcher.process_data(event) @@ -62,7 +62,7 @@ class PubsubTest(StanzaHandlerTest): self.dispatcher.register_handler( *StanzaHandler(name='message', callback=_on_message, - ns=NS_PUBSUB_EVENT, + ns=Namespace.PUBSUB_EVENT, priority=16)) self.dispatcher.process_data(event) @@ -93,7 +93,7 @@ class PubsubTest(StanzaHandlerTest): self.dispatcher.register_handler( *StanzaHandler(name='message', callback=_on_message, - ns=NS_PUBSUB_EVENT, + ns=Namespace.PUBSUB_EVENT, priority=16)) self.dispatcher.process_data(event) diff --git a/test/unit/test_tune.py b/test/unit/test_tune.py index fcb0f45..da573c2 100644 --- a/test/unit/test_tune.py +++ b/test/unit/test_tune.py @@ -1,6 +1,6 @@ from test.lib.util import StanzaHandlerTest -from nbxmpp.protocol import NS_PUBSUB_EVENT +from nbxmpp.namespaces import Namespace from nbxmpp.structs import StanzaHandler from nbxmpp.structs import TuneData from nbxmpp.structs import PubSubEventData @@ -55,6 +55,6 @@ class TuneTest(StanzaHandlerTest): self.dispatcher.register_handler( *StanzaHandler(name='message', callback=_on_message, - ns=NS_PUBSUB_EVENT)) + ns=Namespace.PUBSUB_EVENT)) self.dispatcher.process_data(event) |