[Erp5-report] r19696 - /erp5/trunk/products/ZSQLCatalog/tests/testSearchKeys.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Mar 5 13:11:15 CET 2008


Author: jerome
Date: Wed Mar  5 13:11:14 2008
New Revision: 19696

URL: http://svn.erp5.org?rev=19696&view=rev
Log:
use unittest.TestCase instead of ERP5TypeTestCase for faster setup

Modified:
    erp5/trunk/products/ZSQLCatalog/tests/testSearchKeys.py

Modified: erp5/trunk/products/ZSQLCatalog/tests/testSearchKeys.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/tests/testSearchKeys.py?rev=19696&r1=19695&r2=19696&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/tests/testSearchKeys.py (original)
+++ erp5/trunk/products/ZSQLCatalog/tests/testSearchKeys.py Wed Mar  5 13:11:14 2008
@@ -28,7 +28,6 @@
 
 import unittest
 from DateTime import DateTime
-from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
 from Products.ZSQLCatalog.SearchKey.DefaultKey import DefaultKey
 from Products.ZSQLCatalog.SearchKey.RawKey import RawKey
 from Products.ZSQLCatalog.SearchKey.KeyWordKey import KeyWordKey
@@ -38,7 +37,7 @@
 from Products.ZSQLCatalog.SQLCatalog import getSearchKeyInstance
 from Products.ZSQLCatalog.SearchKey.ScriptableKey import ScriptableKey, KeyMappingKey
 
-class TestSearchKeyLexer(ERP5TypeTestCase):
+class TestSearchKeyLexer(unittest.TestCase):
   """Test search keys
   """
   run_all_test = 1
@@ -49,7 +48,7 @@
     key = getSearchKeyInstance(search_key_class)
     tokens = key.tokenize(search_value)  
     token_types = [x.type for x in tokens]
-    self.assertSameSet(token_types, expected_token_types)  
+    self.assertEquals(set(token_types), set(expected_token_types))
 
   
   def test_01ProperPoolInitialization(self, quiet=quiet, run=run_all_test):
@@ -139,7 +138,7 @@
                 'John Doe OR creation_date>=2005/12/12',
                 ('WORD', 'WORD', 'OR', 'KEYMAPPING',))                
                    
-class TestSearchKeyQuery(ERP5TypeTestCase):
+class TestSearchKeyQuery(unittest.TestCase):
   """Test search keys query generation
   """
   run_all_test = 1




More information about the Erp5-report mailing list