[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form/ftests - test_checkboxwidget.py:1.2.6.1 test_datetimewidget.py:1.2.6.1 test_filewidget.py:1.2.6.1 test_floatwidget.py:1.2.6.1 test_intwidget.py:1.2.6.1 test_textareawidget.py:1.2.6.1 test_textwidget.py:1.2.6.1

Jim Fulton jim at zope.com
Fri Sep 12 15:15:43 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/browser/form/ftests
In directory cvs.zope.org:/tmp/cvs-serv13470/src/zope/app/browser/form/ftests

Modified Files:
      Tag: parentgeddon-branch
	test_checkboxwidget.py test_datetimewidget.py 
	test_filewidget.py test_floatwidget.py test_intwidget.py 
	test_textareawidget.py test_textwidget.py 
Log Message:
Can't have the tests passing, can we?

=== Zope3/src/zope/app/browser/form/ftests/test_checkboxwidget.py 1.2 => 1.2.6.1 ===
--- Zope3/src/zope/app/browser/form/ftests/test_checkboxwidget.py:1.2	Wed Aug 13 17:27:58 2003
+++ Zope3/src/zope/app/browser/form/ftests/test_checkboxwidget.py	Fri Sep 12 15:15:11 2003
@@ -59,7 +59,7 @@
 
 
     def test_display_editform(self):
-        self.getRootFolder().setObject('test', BoolTest())
+        self.getRootFolder()['test'] = BoolTest()
         get_transaction().commit()
 
         # display edit view
@@ -82,7 +82,7 @@
 
 
     def test_submit_editform(self):
-        self.getRootFolder().setObject('test', BoolTest())
+        self.getRootFolder()['test'] = BoolTest()
         get_transaction().commit()
 
         # submit edit view
@@ -104,7 +104,7 @@
         object = BoolTest()
         object.b1 = True
         object.b2 = True
-        self.getRootFolder().setObject('test', object)
+        self.getRootFolder()['test'] = object
         get_transaction().commit()
 
         # submit invalud type for text line
@@ -126,7 +126,7 @@
         # Note: checkbox widget doesn't support a missing value. This
         # test confirms that one cannot set a Bool field to None.
 
-        self.getRootFolder().setObject('test', BoolTest())
+        self.getRootFolder()['test'] = BoolTest()
         get_transaction().commit()
 
         # confirm default value of b1 is True


=== Zope3/src/zope/app/browser/form/ftests/test_datetimewidget.py 1.2 => 1.2.6.1 ===
--- Zope3/src/zope/app/browser/form/ftests/test_datetimewidget.py:1.2	Wed Aug 13 17:27:58 2003
+++ Zope3/src/zope/app/browser/form/ftests/test_datetimewidget.py	Fri Sep 12 15:15:11 2003
@@ -95,7 +95,7 @@
 
 
     def test_display_editform(self):
-        self.getRootFolder().setObject('test', DatetimeTest())
+        self.getRootFolder()['test'] = DatetimeTest()
         get_transaction().commit()
         object = traverse(self.getRootFolder(), 'test')
 
@@ -110,7 +110,7 @@
 
 
     def test_submit_editform(self):
-        self.getRootFolder().setObject('test', DatetimeTest())
+        self.getRootFolder()['test'] = DatetimeTest()
         get_transaction().commit()
 
         d1 = datetime(2003, 2, 1, tzinfo=tzinfo(0))
@@ -136,7 +136,7 @@
 
 
     def test_missing_value(self):
-        self.getRootFolder().setObject('test', DatetimeTest())
+        self.getRootFolder()['test'] = DatetimeTest()
         get_transaction().commit()
 
         # submit missing values for d2 and d3
@@ -156,7 +156,7 @@
 
 
     def test_required_validation(self):
-        self.getRootFolder().setObject('test', DatetimeTest())
+        self.getRootFolder()['test'] = DatetimeTest()
         get_transaction().commit()
 
         # submit missing values for required field d1
@@ -174,7 +174,7 @@
 
 
     def test_inalid_value(self):
-        self.getRootFolder().setObject('test', DatetimeTest())
+        self.getRootFolder()['test'] = DatetimeTest()
         get_transaction().commit()
 
         # submit a value for d3 that isn't allowed
@@ -186,7 +186,7 @@
 
 
     def test_min_max_validation(self):
-        self.getRootFolder().setObject('test', DatetimeTest())
+        self.getRootFolder()['test'] = DatetimeTest()
         get_transaction().commit()
 
         # submit value for d1 that is too low
@@ -207,7 +207,7 @@
 
 
     def test_omitted_value(self):
-        self.getRootFolder().setObject('test', DatetimeTest())
+        self.getRootFolder()['test'] = DatetimeTest()
         get_transaction().commit()
 
         # remember default values


=== Zope3/src/zope/app/browser/form/ftests/test_filewidget.py 1.2 => 1.2.6.1 ===
--- Zope3/src/zope/app/browser/form/ftests/test_filewidget.py:1.2	Wed Aug 13 17:27:58 2003
+++ Zope3/src/zope/app/browser/form/ftests/test_filewidget.py	Fri Sep 12 15:15:11 2003
@@ -82,7 +82,7 @@
 
 
     def test_display_editform(self):
-        self.getRootFolder().setObject('test', FileTest())
+        self.getRootFolder()['test'] = FileTest()
         get_transaction().commit()
 
         # display edit view
@@ -97,7 +97,7 @@
 
 
     def test_submit_text(self):
-        self.getRootFolder().setObject('test', FileTest())
+        self.getRootFolder()['test'] = FileTest()
         get_transaction().commit()
         object = traverse(self.getRootFolder(), 'test')
         self.assert_(object.f1 is None)
@@ -119,7 +119,7 @@
 
 
     def XXX_test_invalid_value(self):
-        self.getRootFolder().setObject('test', FileTest())
+        self.getRootFolder()['test'] = FileTest()
         get_transaction().commit()
 
         # submit an invalid file value
@@ -135,7 +135,7 @@
 
 
     def XXX_test_required_validation(self):
-        self.getRootFolder().setObject('test', TextLineTest())
+        self.getRootFolder()['test'] = TextLineTest()
         get_transaction().commit()
 
         # submit missing values for required field s1
@@ -152,7 +152,7 @@
 
 
     def test_empty_file(self):
-        self.getRootFolder().setObject('test', FileTest())
+        self.getRootFolder()['test'] = FileTest()
         get_transaction().commit()
 
         # submit an empty text file


=== Zope3/src/zope/app/browser/form/ftests/test_floatwidget.py 1.2 => 1.2.6.1 ===
--- Zope3/src/zope/app/browser/form/ftests/test_floatwidget.py:1.2	Wed Aug 13 17:27:58 2003
+++ Zope3/src/zope/app/browser/form/ftests/test_floatwidget.py	Fri Sep 12 15:15:11 2003
@@ -67,7 +67,7 @@
 
 
     def test_display_editform(self):
-        self.getRootFolder().setObject('test', FloatTest())
+        self.getRootFolder()['test'] = FloatTest()
         get_transaction().commit()
 
         # display edit view
@@ -88,7 +88,7 @@
 
 
     def test_submit_editform(self):
-        self.getRootFolder().setObject('test', FloatTest())
+        self.getRootFolder()['test'] = FloatTest()
         get_transaction().commit()
 
         # submit edit view
@@ -109,7 +109,7 @@
 
 
     def test_missing_value(self):
-        self.getRootFolder().setObject('test', FloatTest())
+        self.getRootFolder()['test'] = FloatTest()
         get_transaction().commit()
 
         # submit missing values for f2 and f3
@@ -130,7 +130,7 @@
 
 
     def test_required_validation(self):
-        self.getRootFolder().setObject('test', FloatTest())
+        self.getRootFolder()['test'] = FloatTest()
         get_transaction().commit()
 
         # submit missing values for required field f1
@@ -148,7 +148,7 @@
 
 
     def test_invalid_allowed_value(self):
-        self.getRootFolder().setObject('test', FloatTest())
+        self.getRootFolder()['test'] = FloatTest()
         get_transaction().commit()
 
         # submit a value for f3 that isn't allowed
@@ -160,7 +160,7 @@
 
 
     def test_min_max_validation(self):
-        self.getRootFolder().setObject('test', FloatTest())
+        self.getRootFolder()['test'] = FloatTest()
         get_transaction().commit()
 
         # submit value for f1 that is too low
@@ -181,7 +181,7 @@
 
 
     def test_omitted_value(self):
-        self.getRootFolder().setObject('test', FloatTest())
+        self.getRootFolder()['test'] = FloatTest()
         get_transaction().commit()
 
         # confirm default values
@@ -207,7 +207,7 @@
 
 
     def test_conversion(self):
-        self.getRootFolder().setObject('test', FloatTest())
+        self.getRootFolder()['test'] = FloatTest()
         get_transaction().commit()
 
         # submit value for f1 that cannot be convert to an float


=== Zope3/src/zope/app/browser/form/ftests/test_intwidget.py 1.2 => 1.2.6.1 ===
--- Zope3/src/zope/app/browser/form/ftests/test_intwidget.py:1.2	Wed Aug 13 17:27:58 2003
+++ Zope3/src/zope/app/browser/form/ftests/test_intwidget.py	Fri Sep 12 15:15:11 2003
@@ -89,7 +89,7 @@
 
 
     def test_display_editform(self):
-        self.getRootFolder().setObject('test', IntTest())
+        self.getRootFolder()['test'] = IntTest()
         get_transaction().commit()
 
         # display edit view
@@ -110,7 +110,7 @@
 
 
     def test_submit_editform(self):
-        self.getRootFolder().setObject('test', IntTest())
+        self.getRootFolder()['test'] = IntTest()
         get_transaction().commit()
 
         # submit edit view
@@ -131,7 +131,7 @@
 
 
     def test_missing_value(self):
-        self.getRootFolder().setObject('test', IntTest())
+        self.getRootFolder()['test'] = IntTest()
         get_transaction().commit()
 
         # submit missing values for i2 and i3
@@ -156,7 +156,7 @@
         that, when selected, updates the field with field.missing_value.
         """
     
-        self.getRootFolder().setObject('test', IntTest2()) # note alt. class
+        self.getRootFolder()['test'] = IntTest2() # note alt. class
         get_transaction().commit()
 
         # display edit form
@@ -186,7 +186,7 @@
 
 
     def test_required_validation(self):
-        self.getRootFolder().setObject('test', IntTest())
+        self.getRootFolder()['test'] = IntTest()
         get_transaction().commit()
 
         # submit missing values for required field i1
@@ -204,7 +204,7 @@
 
 
     def test_invalid_allowed_value(self):
-        self.getRootFolder().setObject('test', IntTest())
+        self.getRootFolder()['test'] = IntTest()
         get_transaction().commit()
 
         # submit a value for i3 that isn't allowed
@@ -216,7 +216,7 @@
 
 
     def test_min_max_validation(self):
-        self.getRootFolder().setObject('test', IntTest())
+        self.getRootFolder()['test'] = IntTest()
         get_transaction().commit()
 
         # submit value for i1 that is too low
@@ -237,7 +237,7 @@
 
 
     def test_omitted_value(self):
-        self.getRootFolder().setObject('test', IntTest())
+        self.getRootFolder()['test'] = IntTest()
         get_transaction().commit()
 
         # confirm default values
@@ -263,7 +263,7 @@
 
 
     def test_conversion(self):
-        self.getRootFolder().setObject('test', IntTest())
+        self.getRootFolder()['test'] = IntTest()
         get_transaction().commit()
 
         # submit value for i1 that cannot be convert to an int


=== Zope3/src/zope/app/browser/form/ftests/test_textareawidget.py 1.2 => 1.2.6.1 ===
--- Zope3/src/zope/app/browser/form/ftests/test_textareawidget.py:1.2	Wed Aug 13 17:27:58 2003
+++ Zope3/src/zope/app/browser/form/ftests/test_textareawidget.py	Fri Sep 12 15:15:11 2003
@@ -64,7 +64,7 @@
 
 
     def test_display_editform(self):
-        self.getRootFolder().setObject('test', TextTest())
+        self.getRootFolder()['test'] = TextTest()
         get_transaction().commit()
 
         # display edit view
@@ -84,7 +84,7 @@
 
 
     def test_submit_editform(self):
-        self.getRootFolder().setObject('test', TextTest())
+        self.getRootFolder()['test'] = TextTest()
         get_transaction().commit()
 
         # submit edit view
@@ -105,7 +105,7 @@
 
 
     def test_inalid_type(self):
-        self.getRootFolder().setObject('test', TextTest())
+        self.getRootFolder()['test'] = TextTest()
         get_transaction().commit()
 
         # submit invalid type for text
@@ -119,7 +119,7 @@
 
 
     def test_missing_value(self):
-        self.getRootFolder().setObject('test', TextTest())
+        self.getRootFolder()['test'] = TextTest()
         get_transaction().commit()
 
         # submit missing values for s2 and s3
@@ -140,7 +140,7 @@
 
 
     def test_required_validation(self):
-        self.getRootFolder().setObject('test', TextTest())
+        self.getRootFolder()['test'] = TextTest()
         get_transaction().commit()
 
         # submit missing values for required field s1
@@ -158,7 +158,7 @@
 
 
     def test_length_validation(self):
-        self.getRootFolder().setObject('test', TextTest())
+        self.getRootFolder()['test'] = TextTest()
         get_transaction().commit()
 
         # submit value for s1 that is too short
@@ -179,7 +179,7 @@
 
 
     def test_omitted_value(self):
-        self.getRootFolder().setObject('test', TextTest())
+        self.getRootFolder()['test'] = TextTest()
         get_transaction().commit()
 
         # confirm default values
@@ -205,7 +205,7 @@
 
 
     def test_conversion(self):
-        self.getRootFolder().setObject('test', TextTest())
+        self.getRootFolder()['test'] = TextTest()
         get_transaction().commit()
 
         # confirm that line terminators are converted correctly on post


=== Zope3/src/zope/app/browser/form/ftests/test_textwidget.py 1.2 => 1.2.6.1 ===
--- Zope3/src/zope/app/browser/form/ftests/test_textwidget.py:1.2	Wed Aug 13 17:27:58 2003
+++ Zope3/src/zope/app/browser/form/ftests/test_textwidget.py	Fri Sep 12 15:15:11 2003
@@ -65,7 +65,7 @@
 class Test(BrowserTestCase):
 
     def test_display_editform(self):
-        self.getRootFolder().setObject('test', TextLineTest())
+        self.getRootFolder()['test'] = TextLineTest()
         get_transaction().commit()
 
         # display edit view
@@ -86,7 +86,7 @@
 
 
     def test_submit_editform(self):
-        self.getRootFolder().setObject('test', TextLineTest())
+        self.getRootFolder()['test'] = TextLineTest()
         get_transaction().commit()
 
         # submit edit view
@@ -107,7 +107,7 @@
 
 
     def test_inalid_type(self):
-        self.getRootFolder().setObject('test', TextLineTest())
+        self.getRootFolder()['test'] = TextLineTest()
         get_transaction().commit()
 
         # submit invalud type for text line
@@ -121,7 +121,7 @@
 
 
     def test_missing_value(self):
-        self.getRootFolder().setObject('test', TextLineTest())
+        self.getRootFolder()['test'] = TextLineTest()
         get_transaction().commit()
 
         # submit missing values for s2 and s3
@@ -142,7 +142,7 @@
 
 
     def test_required_validation(self):
-        self.getRootFolder().setObject('test', TextLineTest())
+        self.getRootFolder()['test'] = TextLineTest()
         get_transaction().commit()
 
         # submit missing values for required field s1
@@ -160,7 +160,7 @@
 
 
     def test_inalid_value(self):
-        self.getRootFolder().setObject('test', TextLineTest())
+        self.getRootFolder()['test'] = TextLineTest()
         get_transaction().commit()
 
         # submit a value for s3 that isn't allowed
@@ -172,7 +172,7 @@
 
 
     def test_length_validation(self):
-        self.getRootFolder().setObject('test', TextLineTest())
+        self.getRootFolder()['test'] = TextLineTest()
         get_transaction().commit()
 
         # submit value for s1 that is too short
@@ -193,7 +193,7 @@
 
 
     def test_omitted_value(self):
-        self.getRootFolder().setObject('test', TextLineTest())
+        self.getRootFolder()['test'] = TextLineTest()
         get_transaction().commit()
 
         # confirm default values




More information about the Zope3-Checkins mailing list