Commit 6a4fc8b5 authored by Jérome Perrin's avatar Jérome Perrin

use unittest.TestCase instead of ERP5TypeTestCase for faster setup


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19696 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b16acb6c
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
import unittest import unittest
from DateTime import DateTime from DateTime import DateTime
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ZSQLCatalog.SearchKey.DefaultKey import DefaultKey from Products.ZSQLCatalog.SearchKey.DefaultKey import DefaultKey
from Products.ZSQLCatalog.SearchKey.RawKey import RawKey from Products.ZSQLCatalog.SearchKey.RawKey import RawKey
from Products.ZSQLCatalog.SearchKey.KeyWordKey import KeyWordKey from Products.ZSQLCatalog.SearchKey.KeyWordKey import KeyWordKey
...@@ -38,7 +37,7 @@ from Products.ZSQLCatalog.SearchKey.FloatKey import FloatKey ...@@ -38,7 +37,7 @@ from Products.ZSQLCatalog.SearchKey.FloatKey import FloatKey
from Products.ZSQLCatalog.SQLCatalog import getSearchKeyInstance from Products.ZSQLCatalog.SQLCatalog import getSearchKeyInstance
from Products.ZSQLCatalog.SearchKey.ScriptableKey import ScriptableKey, KeyMappingKey from Products.ZSQLCatalog.SearchKey.ScriptableKey import ScriptableKey, KeyMappingKey
class TestSearchKeyLexer(ERP5TypeTestCase): class TestSearchKeyLexer(unittest.TestCase):
"""Test search keys """Test search keys
""" """
run_all_test = 1 run_all_test = 1
...@@ -49,7 +48,7 @@ class TestSearchKeyLexer(ERP5TypeTestCase): ...@@ -49,7 +48,7 @@ class TestSearchKeyLexer(ERP5TypeTestCase):
key = getSearchKeyInstance(search_key_class) key = getSearchKeyInstance(search_key_class)
tokens = key.tokenize(search_value) tokens = key.tokenize(search_value)
token_types = [x.type for x in tokens] 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): def test_01ProperPoolInitialization(self, quiet=quiet, run=run_all_test):
...@@ -139,7 +138,7 @@ size/Child/34""" ...@@ -139,7 +138,7 @@ size/Child/34"""
'John Doe OR creation_date>=2005/12/12', 'John Doe OR creation_date>=2005/12/12',
('WORD', 'WORD', 'OR', 'KEYMAPPING',)) ('WORD', 'WORD', 'OR', 'KEYMAPPING',))
class TestSearchKeyQuery(ERP5TypeTestCase): class TestSearchKeyQuery(unittest.TestCase):
"""Test search keys query generation """Test search keys query generation
""" """
run_all_test = 1 run_all_test = 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment