diff options
author | Lance Stout <lancestout@gmail.com> | 2010-08-05 20:23:07 -0400 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2010-08-05 20:23:07 -0400 |
commit | 58f77d898f82ab108fa17d562a32c68d3ea35306 (patch) | |
tree | 441530e8518726fb55b2056340fa5ea03bec7638 /tests/test_forms.py | |
parent | c54466596f3dcc7a35a41c49fff0d057d4a8ed8f (diff) | |
download | slixmpp-58f77d898f82ab108fa17d562a32c68d3ea35306.tar.gz slixmpp-58f77d898f82ab108fa17d562a32c68d3ea35306.tar.bz2 slixmpp-58f77d898f82ab108fa17d562a32c68d3ea35306.tar.xz slixmpp-58f77d898f82ab108fa17d562a32c68d3ea35306.zip |
Updated tests to use a relative import for SleekTest to please Python3.
Fixed some tabs/spaces issues.
Diffstat (limited to 'tests/test_forms.py')
-rw-r--r-- | tests/test_forms.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/test_forms.py b/tests/test_forms.py index 7d37506d..d5710633 100644 --- a/tests/test_forms.py +++ b/tests/test_forms.py @@ -1,4 +1,4 @@ -from sleektest import * +from . sleektest import * import sleekxmpp.plugins.xep_0004 as xep_0004 @@ -28,11 +28,11 @@ class TestDataForms(SleekTest): msg = self.Message() form = msg['form'] - form.addField(var='f1', - ftype='text-single', + form.addField(var='f1', + ftype='text-single', label='Text', - desc='A text field', - required=True, + desc='A text field', + required=True, value='Some text!') self.checkMessage(msg, """ @@ -47,8 +47,8 @@ class TestDataForms(SleekTest): </message> """) - form['fields'] = [('f1', {'type': 'text-single', - 'label': 'Username', + form['fields'] = [('f1', {'type': 'text-single', + 'label': 'Username', 'required': True}), ('f2', {'type': 'text-private', 'label': 'Password', @@ -58,7 +58,7 @@ class TestDataForms(SleekTest): 'value': 'Enter message.\nA long one even.'}), ('f4', {'type': 'list-single', 'label': 'Message Type', - 'options': [{'label': 'Cool!', + 'options': [{'label': 'Cool!', 'value': 'cool'}, {'label': 'Urgh!', 'value': 'urgh'}]})] @@ -89,13 +89,13 @@ class TestDataForms(SleekTest): def testSetValues(self): """Testing setting form values""" - + msg = self.Message() form = msg['form'] form.setFields([ ('foo', {'type': 'text-single'}), ('bar', {'type': 'list-multi'})]) - + form.setValues({'foo': 'Foo!', 'bar': ['a', 'b']}) |