diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-10-22 13:35:54 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-10-22 13:37:46 +0100 |
commit | d008988843f61efb57cb06a30b8a47a357e248a4 (patch) | |
tree | e1bd486fd53639561f5af179451f846e371b570c /tests | |
parent | dcacc7d7d50d3f720cb14f1382c6d4f5a13664a4 (diff) | |
download | slixmpp-d008988843f61efb57cb06a30b8a47a357e248a4.tar.gz slixmpp-d008988843f61efb57cb06a30b8a47a357e248a4.tar.bz2 slixmpp-d008988843f61efb57cb06a30b8a47a357e248a4.tar.xz slixmpp-d008988843f61efb57cb06a30b8a47a357e248a4.zip |
Manual cleanup of the remaining set([…]) and set((…)).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_stanza_element.py | 4 | ||||
-rw-r--r-- | tests/test_stanza_xep_0030.py | 14 | ||||
-rw-r--r-- | tests/test_stream_presence.py | 2 | ||||
-rw-r--r-- | tests/test_stream_xep_0030.py | 8 | ||||
-rw-r--r-- | tests/test_stream_xep_0047.py | 2 |
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): |