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

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Apr 25 13:32:47 CEST 2008


Author: nicolas
Date: Fri Apr 25 13:32:43 2008
New Revision: 20813

URL: http://svn.erp5.org?rev=20813&view=rev
Log:
Check List Order too

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=20813&r1=20812&r2=20813&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/tests/testSearchKeys.py (original)
+++ erp5/trunk/products/ZSQLCatalog/tests/testSearchKeys.py Fri Apr 25 13:32:43 2008
@@ -43,21 +43,12 @@
   run_all_test = 1
   quiet = 0
 
-  def assertSameSet(self, a, b, msg=""):
-    if not msg:
-      msg='%r != %r' % (a, b)
-    for i in a:
-      self.failUnless(i in b, msg)
-    for i in b:
-      self.failUnless(i in a, msg)
-    self.assertEquals(len(a), len(b), msg)
-
   def compare(self, search_key_class, search_value, expected_token_types):
     """ """
     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.assertEqual(token_types, list(expected_token_types))
 
   def test_01ProperPoolInitialization(self, quiet=quiet, run=run_all_test):
     """ Check that search key pool is properly initialized """




More information about the Erp5-report mailing list