Ignore:
Timestamp:
Apr 22, 2009, 4:53:43 PM (13 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
Convert:
svn:b33ecbfc-034c-dc11-8662-000475d9059e/trunk@168
Message:

Don't do type interpretation on parsing Data Forms fields.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wokkel/test/test_pubsub.py

    r53 r56  
    754754                "pubsub#deliver_payloads":
    755755                    {"type": "boolean",
    756                      "label": "Deliver payloads with event notifications"}
     756                     "label": "Deliver payloads with event notifications"},
     757                "pubsub#owner":
     758                    {"type": "jid-single",
     759                     "label": "Owner of the node"}
    757760                }
    758761
     
    763766
    764767            return defer.succeed({'pubsub#deliver_payloads': '0',
    765                                   'pubsub#persist_items': '1'})
     768                                  'pubsub#persist_items': '1',
     769                                  'pubsub#owner': JID('user@example.org')})
    766770
    767771        def cb(element):
     
    776780            field = fields['pubsub#deliver_payloads']
    777781            self.assertEqual('boolean', field.fieldType)
     782            field.typeCheck()
    778783            self.assertEqual(False, field.value)
    779784
     
    781786            field = fields['pubsub#persist_items']
    782787            self.assertEqual('boolean', field.fieldType)
     788            field.typeCheck()
    783789            self.assertEqual(True, field.value)
     790
     791            self.assertIn('pubsub#owner', fields)
     792            field = fields['pubsub#owner']
     793            self.assertEqual('jid-single', field.fieldType)
     794            field.typeCheck()
     795            self.assertEqual(JID('user@example.org'), field.value)
    784796
    785797        self.service.getConfigurationOptions = getConfigurationOptions
Note: See TracChangeset for help on using the changeset viewer.