[Zope3-checkins] SVN: Zope3/trunk/src/zope/ - Updated to the latest
version of the testrunner.
Stephan Richter
srichter at cosmos.phy.tufts.edu
Tue Jun 13 18:00:48 EDT 2006
Log message for revision 68625:
- Updated to the latest version of the testrunner.
- Changed the browser widget setup a little bit. It just did not work
when running the test coverage. I think this is an issue with the
sys._getframe hack in zope.interface.interface.
Changed:
_U Zope3/trunk/src/zope/
U Zope3/trunk/src/zope/app/form/browser/tests/test_browserwidget.py
-=-
Property changes on: Zope3/trunk/src/zope
___________________________________________________________________
Name: svn:externals
- testing -r67760 svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing
browsertestrecorder -r67598 svn://svn.zope.org/repos/main/zope.testrecorder/trunk
+ testing -r68624 svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing
browsertestrecorder -r67598 svn://svn.zope.org/repos/main/zope.testrecorder/trunk
Modified: Zope3/trunk/src/zope/app/form/browser/tests/test_browserwidget.py
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/tests/test_browserwidget.py 2006-06-13 21:36:04 UTC (rev 68624)
+++ Zope3/trunk/src/zope/app/form/browser/tests/test_browserwidget.py 2006-06-13 22:00:47 UTC (rev 68625)
@@ -39,15 +39,15 @@
class BrowserWidgetTest(PlacelessSetup,
support.VerifyResults,
unittest.TestCase):
-
+
_FieldFactory = Text
_WidgetFactory = None
-
+
def setUpContent(self, desc=u'', title=u'Foo Title'):
+ field = self._FieldFactory(
+ __name__='foo', title=title, description=desc)
class ITestContent(Interface):
- foo = self._FieldFactory(
- title=title,
- description=desc)
+ foo = field
class TestObject:
implements(ITestContent)
self.content = TestObject()
@@ -56,14 +56,14 @@
request = TestRequest(HTTP_ACCEPT_LANGUAGE='pl')
request.form['field.foo'] = u'Foo Value'
self._widget = self._WidgetFactory(field, request)
-
+
def setUp(self):
super(BrowserWidgetTest, self).setUp()
self.setUpContent()
class SimpleInputWidgetTest(BrowserWidgetTest):
-
+
_WidgetFactory = SimpleInputWidget
def test_required(self):
@@ -147,7 +147,7 @@
self._widget.request.form['field.foo'] = u'barf!'
self.failIf(self._widget.hasValidInput())
- del self._widget.request.form['field.foo']
+ del self._widget.request.form['field.foo']
self._widget.context.required = True
self.failIf(self._widget.hasValidInput())
@@ -164,7 +164,7 @@
self._widget.request.form['field.foo'] = u'barf!'
self.assertRaises(ConversionError, self._widget.getInputValue)
- del self._widget.request.form['field.foo']
+ del self._widget.request.form['field.foo']
self._widget.context.required = True
self.assertRaises(MissingInputError, self._widget.getInputValue)
More information about the Zope3-Checkins
mailing list