Ignore:
Timestamp:
23 Jan 2012, 12:35:12 (13 years ago)
Author:
uli
Message:

Fix deprecation warnings with Python 2.7

Location:
main/waeup.sirp/trunk/src/waeup/sirp/widgets/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/widgets/tests/test_datewidget.py

    r7196 r7501  
    5858    def test_hasInput(self):
    5959        del self._widget.request.form['field.foo']
    60         self.failIf(self._widget.hasInput())
     60        self.assertFalse(self._widget.hasInput())
    6161        self._widget.request.form['field.foo'] = u''
    62         self.failUnless(self._widget.hasInput())
     62        self.assertTrue(self._widget.hasInput())
    6363        self._widget.request.form['field.foo'] = u'2003-03-26'
    64         self.failUnless(self._widget.hasInput())
     64        self.assertTrue(self._widget.hasInput())
    6565
    6666    def test_getDefaultInputValue(self,
     
    101101
    102102    def testDefaultDisplayStyle(self):
    103         self.failIf(self._widget.displayStyle)
     103        self.assertFalse(self._widget.displayStyle)
    104104
    105105    def testRenderDefault(self):
  • main/waeup.sirp/trunk/src/waeup/sirp/widgets/tests/test_objectwidget.py

    r7321 r7501  
    120120        error_html = widget.error()
    121121        if sys.version_info < (2, 5):
    122             self.failUnless("email: <zope.formlib.interfaces.Mis"
     122            self.assertTrue("email: <zope.formlib.interfaces.Mis"
    123123                             in error_html)
    124             self.failUnless("name: <zope.formlib.interfaces.Miss"
     124            self.assertTrue("name: <zope.formlib.interfaces.Miss"
    125125                             in error_html)
    126126        else:
    127             self.failUnless(
     127            self.assertTrue(
    128128                "email: MissingInputError(u'field.foo.email', u'', None)"
    129129                in error_html)
    130             self.failUnless(
     130            self.assertTrue(
    131131                "name: MissingInputError(u'field.foo.name', u'', None)"
    132132                in error_html)
Note: See TracChangeset for help on using the changeset viewer.