summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_stanza_element.py4
-rw-r--r--tests/test_stanza_xep_0030.py14
-rw-r--r--tests/test_stream_presence.py2
-rw-r--r--tests/test_stream_xep_0030.py8
-rw-r--r--tests/test_stream_xep_0047.py2
5 files changed, 15 insertions, 15 deletions
diff --git a/tests/test_stanza_element.py b/tests/test_stanza_element.py
index 678a49fd..89ea0310 100644
--- a/tests/test_stanza_element.py
+++ b/tests/test_stanza_element.py
@@ -561,12 +561,12 @@ class TestElementBase(SlixTest):
stanza = TestStanza()
- self.failUnless(set(stanza.keys()) == set(('lang', 'bar', 'baz')),
+ self.failUnless(set(stanza.keys()) == {'lang', 'bar', 'baz'},
"Returned set of interface keys does not match expected.")
stanza.enable('qux')
- self.failUnless(set(stanza.keys()) == set(('lang', 'bar', 'baz', 'qux')),
+ self.failUnless(set(stanza.keys()) == {'lang', 'bar', 'baz', 'qux'},
"Incorrect set of interface and plugin keys.")
def testGet(self):
diff --git a/tests/test_stanza_xep_0030.py b/tests/test_stanza_xep_0030.py
index 71dc7032..d85f1980 100644
--- a/tests/test_stanza_xep_0030.py
+++ b/tests/test_stanza_xep_0030.py
@@ -254,10 +254,10 @@ class TestDisco(SlixTest):
iq['disco_info'].add_identity('client', 'pc', lang='en')
iq['disco_info'].add_identity('client', 'pc', lang='fr')
- expected = set([('client', 'pc', None, None),
- ('client', 'pc', 'no', None),
- ('client', 'pc', 'en', None),
- ('client', 'pc', 'fr', None)])
+ expected = {('client', 'pc', None, None),
+ ('client', 'pc', 'no', None),
+ ('client', 'pc', 'en', None),
+ ('client', 'pc', 'fr', None)}
self.failUnless(iq['disco_info']['identities'] == expected,
"Identities do not match:\n%s\n%s" % (
expected,
@@ -472,9 +472,9 @@ class TestDisco(SlixTest):
node='bar',
name='Tester')
- expected = set([('user@localhost', None, None),
- ('user@localhost', 'foo', None),
- ('test@localhost', 'bar', 'Tester')])
+ expected = {('user@localhost', None, None),
+ ('user@localhost', 'foo', None),
+ ('test@localhost', 'bar', 'Tester')}
self.failUnless(iq['disco_items']['items'] == expected,
"Items do not match:\n%s\n%s" % (
expected,
diff --git a/tests/test_stream_presence.py b/tests/test_stream_presence.py
index 27559785..caf3fef9 100644
--- a/tests/test_stream_presence.py
+++ b/tests/test_stream_presence.py
@@ -38,7 +38,7 @@ class TestStreamPresence(SlixTest):
to="tester@localhost"/>
""")
- self.assertEqual(events, set(('unavailable',)),
+ self.assertEqual(events, {'unavailable'},
"Got offline incorrectly triggered: %s." % events)
def testGotOffline(self):
diff --git a/tests/test_stream_xep_0030.py b/tests/test_stream_xep_0030.py
index 1d6337d5..d1ad9087 100644
--- a/tests/test_stream_xep_0030.py
+++ b/tests/test_stream_xep_0030.py
@@ -307,7 +307,7 @@ class TestStreamDisco(SlixTest):
</iq>
""")
- self.assertEqual(events, set(('disco_info',)),
+ self.assertEqual(events, {'disco_info'},
"Disco info event was not triggered: %s" % events)
def testDynamicItemsJID(self):
@@ -502,9 +502,9 @@ class TestStreamDisco(SlixTest):
</iq>
""")
- items = set([('user@localhost', 'bar', 'Test'),
- ('user@localhost', 'baz', 'Test 2')])
- self.assertEqual(events, set(('disco_items',)),
+ items = {('user@localhost', 'bar', 'Test'),
+ ('user@localhost', 'baz', 'Test 2')}
+ self.assertEqual(events, {'disco_items'},
"Disco items event was not triggered: %s" % events)
self.assertEqual(results, items,
"Unexpected items: %s" % results)
diff --git a/tests/test_stream_xep_0047.py b/tests/test_stream_xep_0047.py
index ecba2445..a0e6c227 100644
--- a/tests/test_stream_xep_0047.py
+++ b/tests/test_stream_xep_0047.py
@@ -77,7 +77,7 @@ class TestInBandByteStreams(SlixTest):
from="tester@localhost/receiver" />
""")
- self.assertEqual(events, set(['ibb_stream_start', 'callback']))
+ self.assertEqual(events, {'ibb_stream_start', 'callback'})
@asyncio.coroutine
def testSendData(self):