Ignore:
Timestamp:
Oct 3, 2016, 8:49:10 AM (6 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
rebase_source:
125a984a608f7e698bde26531ed1306885cb8bf6
Message:

imported patch py3-dataforms.patch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wokkel/test/test_data_form.py

    r105 r196  
    66"""
    77
     8from __future__ import division, absolute_import
     9
    810from zope.interface import verify
    911from zope.interface.common.mapping import IIterableMapping
    1012
     13from twisted.python.compat import unicode, _PY3
    1114from twisted.trial import unittest
    1215from twisted.words.xish import domish
     
    11351138        form = data_form.Form('submit', fields=fields)
    11361139        keys = form.keys()
    1137         self.assertIsInstance(keys, list)
     1140        if not _PY3:
     1141            self.assertIsInstance(keys, list)
    11381142        self.assertEqual(set(['botname', 'public', 'features']),
    11391143                         set(keys))
     
    11481152        form = data_form.Form('submit', fields=fields)
    11491153        values = form.values()
    1150         self.assertIsInstance(values, list)
     1154        if not _PY3:
     1155            self.assertIsInstance(values, list)
    11511156        self.assertEqual(set(['The Jabber Bot', True]), set(values))
    11521157
     
    11601165        form = data_form.Form('submit', fields=fields)
    11611166        items = form.items()
    1162         self.assertIsInstance(items, list)
     1167        if not _PY3:
     1168            self.assertIsInstance(items, list)
    11631169        self.assertEqual(set([('botname', 'The Jabber Bot'),
    11641170                              ('public', True)]),
Note: See TracChangeset for help on using the changeset viewer.