[CMF-checkins] CVS: CMF/CMFDefault/tests - test_Favorite.py:1.4.6.2

Florent Guillaume fg@nuxeo.com
Sat, 3 Aug 2002 15:30:30 -0400


Update of /cvs-repository/CMF/CMFDefault/tests
In directory cvs.zope.org:/tmp/cvs-serv844/CMFDefault/tests

Modified Files:
      Tag: CMF-1_3-branch
	test_Favorite.py 
Log Message:
Merged changes from HEAD:

Reindex Favorite after edit (collector #22).
Also code cleanup, and fixes:
- initialize correct class
- allow edit of empty url (added test)
- add security assertions


=== CMF/CMFDefault/tests/test_Favorite.py 1.4.6.1 => 1.4.6.2 ===
                         , '%s/portal_url' % self.tool.root )
         self.assertEqual( f.getIcon(), self.tool.getIcon() )
 
+    def test_editEmpty( self ):
+
+        f = self._makeOne( 'gnnn' )
+        f.edit( '' )
+        self.assertEqual( f.getObject(), self.site )
+        self.assertEqual( f.getRemoteUrl(), self.tool.root )
+        self.assertEqual( f.getIcon(), self.site.getIcon() )
+
 
 def test_suite():
     return TestSuite((