Ignore:
Timestamp:
Aug 4, 2008, 8:55:45 AM (13 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
Convert:
svn:b33ecbfc-034c-dc11-8662-000475d9059e/trunk@59
Message:

Implement type checking in data forms and incoming pubsub node config.

Author: ralphm.
Fixes #15.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wokkel/test/test_data_form.py

    r26 r29  
    116116        self.assertEquals(None, form.title)
    117117        self.assertEquals([], form.instructions)
    118         self.assertEquals([], form.fields)
     118        self.assertEquals({}, form.fields)
    119119
    120120
     
    164164        form = Form.fromElement(element)
    165165
    166         self.assertEquals(1, len(form.fields))
     166        self.assertEquals(1, len(form.fieldList))
     167        self.assertNotIn('field', form.fields)
    167168
    168169
     
    173174        form = Form.fromElement(element)
    174175
    175         self.assertEquals(2, len(form.fields))
    176         self.assertEquals('field1', form.fields[0].var)
    177         self.assertEquals('field2', form.fields[1].var)
     176        self.assertEquals(2, len(form.fieldList))
     177        self.assertIn('field1', form.fields)
     178        self.assertEquals('field1', form.fieldList[0].var)
     179        self.assertIn('field2', form.fields)
     180        self.assertEquals('field2', form.fieldList[1].var)
Note: See TracChangeset for help on using the changeset viewer.