summaryrefslogtreecommitdiff
path: root/tests/test_stanza_element.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_stanza_element.py')
-rw-r--r--tests/test_stanza_element.py90
1 files changed, 45 insertions, 45 deletions
diff --git a/tests/test_stanza_element.py b/tests/test_stanza_element.py
index 240203cc..89ea0310 100644
--- a/tests/test_stanza_element.py
+++ b/tests/test_stanza_element.py
@@ -43,18 +43,18 @@ class TestElementBase(SlixTest):
class TestStanzaPlugin(ElementBase):
name = "foo2"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
plugin_attrib = "foo2"
class TestSubStanza(ElementBase):
name = "subfoo"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
register_stanza_plugin(TestStanza, TestStanzaPlugin, iterable=True)
@@ -90,24 +90,24 @@ class TestElementBase(SlixTest):
class TestStanzaPlugin(ElementBase):
name = "pluginfoo"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
plugin_attrib = "plugin_foo"
class TestStanzaPlugin2(ElementBase):
name = "pluginfoo2"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
plugin_attrib = "plugin_foo2"
class TestSubStanza(ElementBase):
name = "subfoo"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
register_stanza_plugin(TestStanza, TestSubStanza, iterable=True)
register_stanza_plugin(TestStanza, TestStanzaPlugin)
@@ -139,8 +139,8 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar', 'baz', 'qux'))
- sub_interfaces = set(('baz',))
+ interfaces = {'bar', 'baz', 'qux'}
+ sub_interfaces = {'baz'}
def get_qux(self):
return 'qux'
@@ -149,7 +149,7 @@ class TestElementBase(SlixTest):
name = "foobar"
namespace = "foo"
plugin_attrib = "foobar"
- interfaces = set(('fizz',))
+ interfaces = {'fizz'}
register_stanza_plugin(TestStanza, TestStanza, iterable=True)
register_stanza_plugin(TestStanza, TestStanzaPlugin)
@@ -185,8 +185,8 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar', 'baz', 'qux'))
- sub_interfaces = set(('baz',))
+ interfaces = {'bar', 'baz', 'qux'}
+ sub_interfaces = {'baz'}
def set_qux(self, value):
pass
@@ -195,7 +195,7 @@ class TestElementBase(SlixTest):
name = "foobar"
namespace = "foo"
plugin_attrib = "foobar"
- interfaces = set(('foobar',))
+ interfaces = {'foobar'}
register_stanza_plugin(TestStanza, TestStanzaPlugin)
@@ -219,8 +219,8 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar', 'baz', 'qux'))
- sub_interfaces = set(('bar',))
+ interfaces = {'bar', 'baz', 'qux'}
+ sub_interfaces = {'bar'}
def del_qux(self):
pass
@@ -229,7 +229,7 @@ class TestElementBase(SlixTest):
name = "foobar"
namespace = "foo"
plugin_attrib = "foobar"
- interfaces = set(('foobar',))
+ interfaces = {'foobar'}
register_stanza_plugin(TestStanza, TestStanzaPlugin)
@@ -261,7 +261,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
stanza = TestStanza()
@@ -298,7 +298,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar',))
+ interfaces = {'bar'}
def set_bar(self, value):
wrapper = ET.Element("{foo}wrapper")
@@ -331,7 +331,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
def set_baz(self, value):
self._set_sub_text("wrapper/baz", text=value)
@@ -382,7 +382,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
def set_bar(self, value):
self._set_sub_text("path/to/only/bar", value)
@@ -458,13 +458,13 @@ class TestElementBase(SlixTest):
class TestSubStanza(ElementBase):
name = "sub"
namespace = "baz"
- interfaces = set(('attrib',))
+ interfaces = {'attrib'}
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar','baz', 'qux'))
- sub_interfaces = set(('qux',))
+ interfaces = {'bar','baz', 'qux'}
+ sub_interfaces = {'qux'}
def set_qux(self, value):
self._set_sub_text('qux', text=value)
@@ -475,7 +475,7 @@ class TestElementBase(SlixTest):
class TestStanzaPlugin(ElementBase):
name = "plugin"
namespace = "http://test/slash/bar"
- interfaces = set(('attrib',))
+ interfaces = {'attrib'}
register_stanza_plugin(TestStanza, TestSubStanza, iterable=True)
register_stanza_plugin(TestStanza, TestStanzaPlugin)
@@ -528,7 +528,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
stanza1 = TestStanza()
stanza1['bar'] = 'a'
@@ -554,19 +554,19 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
plugin_attrib = 'qux'
register_stanza_plugin(TestStanza, TestStanza)
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):
@@ -575,7 +575,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
stanza = TestStanza()
stanza['bar'] = 'a'
@@ -592,12 +592,12 @@ class TestElementBase(SlixTest):
class TestSubStanza(ElementBase):
name = "foobar"
namespace = "foo"
- interfaces = set(('qux',))
+ interfaces = {'qux'}
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
register_stanza_plugin(TestStanza, TestSubStanza, iterable=True)
@@ -652,7 +652,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
stanza1 = TestStanza()
stanza1['bar'] = 'a'
@@ -672,13 +672,13 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
class TestExtension(ElementBase):
name = 'extended'
namespace = 'foo'
plugin_attrib = name
- interfaces = set((name,))
+ interfaces = {name}
is_extension = True
def set_extended(self, value):
@@ -715,13 +715,13 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(('bar', 'baz'))
+ interfaces = {'bar', 'baz'}
class TestOverride(ElementBase):
name = 'overrider'
namespace = 'foo'
plugin_attrib = name
- interfaces = set(('bar',))
+ interfaces = {'bar'}
overrides = ['set_bar']
def setup(self, xml):
@@ -754,7 +754,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = "foo"
namespace = "foo"
- interfaces = set(['bar'])
+ interfaces = {'bar'}
bool_interfaces = interfaces
stanza = TestStanza()
@@ -946,7 +946,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = 'foo'
namespace = 'test'
- interfaces = set(['test'])
+ interfaces = {'test'}
sub_interfaces = interfaces
lang_interfaces = interfaces
@@ -972,7 +972,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = 'foo'
namespace = 'test'
- interfaces = set(['test'])
+ interfaces = {'test'}
sub_interfaces = interfaces
lang_interfaces = interfaces
@@ -1008,7 +1008,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = 'foo'
namespace = 'test'
- interfaces = set(['test'])
+ interfaces = {'test'}
sub_interfaces = interfaces
lang_interfaces = interfaces
@@ -1040,7 +1040,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = 'foo'
namespace = 'test'
- interfaces = set(['test'])
+ interfaces = {'test'}
sub_interfaces = interfaces
lang_interfaces = interfaces
@@ -1096,7 +1096,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = 'foo'
namespace = 'test'
- interfaces = set(['test'])
+ interfaces = {'test'}
sub_interfaces = interfaces
lang_interfaces = interfaces
@@ -1136,7 +1136,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = 'foo'
namespace = 'test'
- interfaces = set(['test'])
+ interfaces = {'test'}
sub_interfaces = interfaces
lang_interfaces = interfaces
@@ -1177,7 +1177,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = 'foo'
namespace = 'test'
- interfaces = set(['test'])
+ interfaces = {'test'}
sub_interfaces = interfaces
lang_interfaces = interfaces
@@ -1217,7 +1217,7 @@ class TestElementBase(SlixTest):
class TestStanza(ElementBase):
name = 'foo'
namespace = 'test'
- interfaces = set(['test'])
+ interfaces = {'test'}
sub_interfaces = interfaces
lang_interfaces = interfaces