~ubuntu-branches/ubuntu/intrepid/moin/intrepid-updates

« back to all changes in this revision

Viewing changes to MoinMoin/_tests/test_util_web.py

  • Committer: Bazaar Package Importer
  • Author(s): Sivan Greenberg
  • Date: 2006-07-09 19:28:02 UTC
  • Revision ID: james.westby@ubuntu.com-20060709192802-oaeuvt4v3e9300uj
Tags: 1.5.3-1ubuntu1
* Merge new debian version.
* Reapply Ubuntu changes:
    + debian/rules:
      - Comment out usage of control.ubuntu.in (doesn't fit!).
    + debian/control.in:
      - Dropped python2.3 binary package.
    + debian/control:
      - Dropped python2.3 binary, again.
      - Dropped python2.3-dev from Build-Depends-Indep.
    + debian/patches/001-attachment-xss-fix.patch:
      - Dropped this patch. It's now in upstream's distribution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
    def setUp(self):
65
65
        html._SORT_ATTRS = 1
66
66
        self.expected = (
67
 
        u'<select name="test">'
 
67
        u'<select name="test" size="1">'
68
68
        u'<option value="one">one</option>'
69
69
        u'<option value="two">two</option>'
70
70
        u'<option value="simple">simple</option>'
75
75
    def testMakeSelectNoSelection(self):
76
76
        """util.web: creating html select with no selection"""
77
77
        expected = self.expected
78
 
        result = unicode(web.makeSelection('test', self.values))
 
78
        result = unicode(web.makeSelection('test', self.values, size=1))
79
79
        self.assertEqual(result, expected,
80
80
                         'Expected "%(expected)s" but got "%(result)s"' % locals())
81
81
 
82
 
    def testMakeSelectNoSelection(self):
 
82
    def testMakeSelectNoSelection2(self):
83
83
        """util.web: creating html select with non existing selection"""
84
84
        expected = self.expected
85
 
        result = unicode(web.makeSelection('test', self.values, 'three'))
 
85
        result = unicode(web.makeSelection('test', self.values, 'three', size=1))
86
86
        self.assertEqual(result, expected,
87
87
                         'Expected "%(expected)s" but got "%(result)s"' % locals())
88
88
        
89
89
    def testMakeSelectWithSelectedItem(self):
90
90
        """util.web: creating html select with selected item"""
91
91
        expected = self.expected.replace('value="two"', 'selected value="two"')
92
 
        result = unicode(web.makeSelection('test', self.values, 'two'))
 
92
        result = unicode(web.makeSelection('test', self.values, 'two', size=1))
93
93
        self.assertEqual(result, expected,
94
94
                         'Expected "%(expected)s" but got "%(result)s"' % locals())
95
95