[Zope3-checkins] CVS: Zope3/src/zope/app/catalog - ftests.py:1.4

Garrett Smith garrett at mojave-corp.com
Fri Mar 5 21:35:12 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/catalog
In directory cvs.zope.org:/tmp/cvs-serv30631/src/zope/app/catalog

Modified Files:
	ftests.py 
Log Message:
Minor cleanup of tests.


=== Zope3/src/zope/app/catalog/ftests.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/catalog/ftests.py:1.3	Tue Mar  2 09:40:00 2004
+++ Zope3/src/zope/app/catalog/ftests.py	Fri Mar  5 21:35:11 2004
@@ -91,7 +91,9 @@
         self.assertEqual(response.getStatus(), 200)
         self.assert_(response.getBody().find('dctitle') != -1)
         self.assert_(response.getBody().find('dccreator') != -1)
-        
+        self.assert_(response.getBody().find('fulltext') != -1)
+        self.assert_(response.getBody().find('name') != -1)
+
         # Now add some content
         response = self.publish("/+/action.html", basic='mgr:mgrpw', 
                                 form={'type_name':u'File', 
@@ -175,21 +177,21 @@
         root = self.getRootFolder()
         cat = root['felix_the']
         name = cat['dctitle']
-        self.assert_(name.documentCount()==8)
+        self.assertEquals(name.documentCount(), 8)
         res = cat.searchResults(dctitle='Second File')
-        self.assert_(len(res)==1)
+        self.assertEquals(len(res), 1)
         res = cat.searchResults(dctitle='Third File')
-        self.assert_(len(res)==3)
+        self.assertEquals(len(res), 3)
         res = cat.searchResults(fulltext='sample')
-        self.assert_(len(res)==2)
+        self.assertEquals(len(res), 2)
         res = cat.searchResults(fulltext='sample', dctitle='Third File')
-        self.assert_(len(res)==1)
+        self.assertEquals(len(res), 1)
         res = cat.searchResults(fulltext='fnargle', dctitle='Third File')
-        self.assert_(len(res)==0)
+        self.assertEquals(len(res), 0)
         res = cat.searchResults(fulltext='sample', dctitle='Zeroth File')
-        self.assert_(len(res)==0)
+        self.assertEquals(len(res), 0)
         res = cat.searchResults(dccreator='zope.mgr', dctitle='Third File')
-        self.assert_(len(res)==3)
+        self.assertEquals(len(res), 3)
 
 def test_suite():
     suite = unittest.TestSuite()




More information about the Zope3-Checkins mailing list