summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_stanza_element.py34
-rw-r--r--tests/test_stanza_xep_0060.py8
2 files changed, 21 insertions, 21 deletions
diff --git a/tests/test_stanza_element.py b/tests/test_stanza_element.py
index 0c49f201..240203cc 100644
--- a/tests/test_stanza_element.py
+++ b/tests/test_stanza_element.py
@@ -142,7 +142,7 @@ class TestElementBase(SlixTest):
interfaces = set(('bar', 'baz', 'qux'))
sub_interfaces = set(('baz',))
- def getQux(self):
+ def get_qux(self):
return 'qux'
class TestStanzaPlugin(ElementBase):
@@ -188,7 +188,7 @@ class TestElementBase(SlixTest):
interfaces = set(('bar', 'baz', 'qux'))
sub_interfaces = set(('baz',))
- def setQux(self, value):
+ def set_qux(self, value):
pass
class TestStanzaPlugin(ElementBase):
@@ -222,7 +222,7 @@ class TestElementBase(SlixTest):
interfaces = set(('bar', 'baz', 'qux'))
sub_interfaces = set(('bar',))
- def delQux(self):
+ def del_qux(self):
pass
class TestStanzaPlugin(ElementBase):
@@ -300,14 +300,14 @@ class TestElementBase(SlixTest):
namespace = "foo"
interfaces = set(('bar',))
- def setBar(self, value):
+ def set_bar(self, value):
wrapper = ET.Element("{foo}wrapper")
bar = ET.Element("{foo}bar")
bar.text = value
wrapper.append(bar)
self.xml.append(wrapper)
- def getBar(self):
+ def get_bar(self):
return self._get_sub_text("wrapper/bar", default="not found")
stanza = TestStanza()
@@ -333,16 +333,16 @@ class TestElementBase(SlixTest):
namespace = "foo"
interfaces = set(('bar', 'baz'))
- def setBaz(self, value):
+ def set_baz(self, value):
self._set_sub_text("wrapper/baz", text=value)
- def getBaz(self):
+ def get_baz(self):
return self._get_sub_text("wrapper/baz")
- def setBar(self, value):
+ def set_bar(self, value):
self._set_sub_text("wrapper/bar", text=value)
- def getBar(self):
+ def get_bar(self):
return self._get_sub_text("wrapper/bar")
stanza = TestStanza()
@@ -384,22 +384,22 @@ class TestElementBase(SlixTest):
namespace = "foo"
interfaces = set(('bar', 'baz'))
- def setBar(self, value):
+ def set_bar(self, value):
self._set_sub_text("path/to/only/bar", value)
- def getBar(self):
+ def get_bar(self):
return self._get_sub_text("path/to/only/bar")
- def delBar(self):
+ def del_bar(self):
self._del_sub("path/to/only/bar")
- def setBaz(self, value):
+ def set_baz(self, value):
self._set_sub_text("path/to/just/baz", value)
- def getBaz(self):
+ def get_baz(self):
return self._get_sub_text("path/to/just/baz")
- def delBaz(self):
+ def del_baz(self):
self._del_sub("path/to/just/baz")
stanza = TestStanza()
@@ -466,10 +466,10 @@ class TestElementBase(SlixTest):
interfaces = set(('bar','baz', 'qux'))
sub_interfaces = set(('qux',))
- def setQux(self, value):
+ def set_qux(self, value):
self._set_sub_text('qux', text=value)
- def getQux(self):
+ def get_qux(self):
return self._get_sub_text('qux')
class TestStanzaPlugin(ElementBase):
diff --git a/tests/test_stanza_xep_0060.py b/tests/test_stanza_xep_0060.py
index 567757cb..9a5e3e0b 100644
--- a/tests/test_stanza_xep_0060.py
+++ b/tests/test_stanza_xep_0060.py
@@ -136,11 +136,11 @@ class TestPubsubStanzas(SlixTest):
iq = self.Iq()
iq['pubsub_owner']['default']
iq['pubsub_owner']['default']['node'] = 'mynode'
- iq['pubsub_owner']['default']['form'].addField('pubsub#title',
+ iq['pubsub_owner']['default']['form'].add_field('pubsub#title',
ftype='text-single',
value='This thing is awesome')
self.check(iq, """
- <iq id="0">
+ <iq id="0">
<pubsub xmlns="http://jabber.org/protocol/pubsub#owner">
<default node="mynode">
<x xmlns="jabber:x:data" type="form">
@@ -161,7 +161,7 @@ class TestPubsubStanzas(SlixTest):
iq['pubsub']['subscribe']['options']['node'] = 'cheese'
iq['pubsub']['subscribe']['options']['jid'] = 'fritzy@netflint.net/slixmpp'
form = xep_0004.Form()
- form.addField('pubsub#title', ftype='text-single', value='this thing is awesome')
+ form.add_field('pubsub#title', ftype='text-single', value='this thing is awesome')
iq['pubsub']['subscribe']['options']['options'] = form
self.check(iq, """
<iq id="0">
@@ -253,7 +253,7 @@ class TestPubsubStanzas(SlixTest):
pub = iq['pubsub']
pub['create']['node'] = 'testnode2'
pub['configure']['form']['type'] = 'submit'
- pub['configure']['form'].setFields([
+ pub['configure']['form'].set_fields([
('FORM_TYPE', {'type': 'hidden',
'value': 'http://jabber.org/protocol/pubsub#node_config'}),
('pubsub#node_type', {'type': 'list-single',