summaryrefslogtreecommitdiff
path: root/tests/test_stanza_xep_0122.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_stanza_xep_0122.py')
-rw-r--r--tests/test_stanza_xep_0122.py64
1 files changed, 32 insertions, 32 deletions
diff --git a/tests/test_stanza_xep_0122.py b/tests/test_stanza_xep_0122.py
index fca49bbb..0c032c05 100644
--- a/tests/test_stanza_xep_0122.py
+++ b/tests/test_stanza_xep_0122.py
@@ -1,13 +1,13 @@
import unittest
-from sleekxmpp import Message
-from sleekxmpp.test import SleekTest
-import sleekxmpp.plugins.xep_0004 as xep_0004
-import sleekxmpp.plugins.xep_0122 as xep_0122
-from sleekxmpp.xmlstream import register_stanza_plugin
+from slixmpp import Message
+from slixmpp.test import SlixTest
+import slixmpp.plugins.xep_0004 as xep_0004
+import slixmpp.plugins.xep_0122 as xep_0122
+from slixmpp.xmlstream import register_stanza_plugin
-class TestDataForms(SleekTest):
+class TestDataForms(SlixTest):
def setUp(self):
register_stanza_plugin(Message, xep_0004.Form)
@@ -19,12 +19,12 @@ class TestDataForms(SleekTest):
"""Testing basic validation setting and getting."""
msg = self.Message()
form = msg['form']
- field = form.addField(var='f1',
- ftype='text-single',
- label='Text',
- desc='A text field',
- required=True,
- value='Some text!')
+ field = form.add_field(var='f1',
+ ftype='text-single',
+ label='Text',
+ desc='A text field',
+ required=True,
+ value='Some text!')
validation = field['validate']
validation['datatype'] = 'xs:string'
@@ -54,12 +54,12 @@ class TestDataForms(SleekTest):
"""Testing open validation setting and getting."""
msg = self.Message()
form = msg['form']
- field = form.addField(var='f1',
- ftype='text-single',
- label='Text',
- desc='A text field',
- required=True,
- value='Some text!')
+ field = form.add_field(var='f1',
+ ftype='text-single',
+ label='Text',
+ desc='A text field',
+ required=True,
+ value='Some text!')
validation = field['validate']
validation.set_open(True)
@@ -88,12 +88,12 @@ class TestDataForms(SleekTest):
"""Testing regex validation setting and getting."""
msg = self.Message()
form = msg['form']
- field = form.addField(var='f1',
- ftype='text-single',
- label='Text',
- desc='A text field',
- required=True,
- value='Some text!')
+ field = form.add_field(var='f1',
+ ftype='text-single',
+ label='Text',
+ desc='A text field',
+ required=True,
+ value='Some text!')
regex_value = '[0-9]+'
@@ -126,12 +126,12 @@ class TestDataForms(SleekTest):
"""Testing range validation setting and getting."""
msg = self.Message()
form = msg['form']
- field = form.addField(var='f1',
- ftype='text-single',
- label='Text',
- desc='A text field',
- required=True,
- value='Some text!')
+ field = form.add_field(var='f1',
+ ftype='text-single',
+ label='Text',
+ desc='A text field',
+ required=True,
+ value='Some text!')
validation = field['validate']
validation.set_range(True, minimum=0, maximum=10)
@@ -160,11 +160,11 @@ class TestDataForms(SleekTest):
"""
msg = self.Message()
form = msg['form']
- field = form.addReported(var='f1', ftype='text-single', label='Text')
+ field = form.add_reported(var='f1', ftype='text-single', label='Text')
validation = field['validate']
validation.set_basic(True)
- form.addItem({'f1': 'Some text!'})
+ form.add_item({'f1': 'Some text!'})
self.check(msg, """
<message>