[MERGE] addons 16 survey
[odoo/odoo.git] / openerp / tests / __init__.py
index 142ec03..aa39b77 100644 (file)
@@ -1,30 +1,29 @@
 # -*- coding: utf-8 -*-
-import unittest2
+"""
+Tests for the OpenERP library.
 
-import test_orm
-import test_ir_sequence
-import test_xmlrpc
+This module groups a few sub-modules containing unittest2 test cases.
 
-# This test suite assumes a database.
-def make_suite():
-    suite = unittest2.TestSuite()
-    suite.addTests(unittest2.TestLoader().loadTestsFromModule(test_ir_sequence))
-    suite.addTests(unittest2.TestLoader().loadTestsFromModule(test_orm))
-    return suite
+Tests can be explicitely added to the `fast_suite` or `checks` lists or not.
+See the :ref:`test-framework` section in the :ref:`features` list.
+"""
 
-# This test suite creates a database.
-def make_suite_no_db():
-    suite = unittest2.TestSuite()
-    suite.addTests(unittest2.TestLoader().loadTestsFromModule(test_xmlrpc))
-    return suite
+from . import test_expression, test_html_sanitize, test_ir_sequence, test_orm,\
+              test_basecase, \
+              test_view_validation, test_uninstall, test_misc, test_db_cursor
 
-# This test suite combines the two above test suites
-# (and thus creates a database).
-def make_complete_suite():
-    suite = unittest2.TestSuite()
-    suite.addTests(unittest2.TestLoader().loadTestsFromModule(test_xmlrpc))
-    suite.addTests(unittest2.TestLoader().loadTestsFromModule(test_ir_sequence))
-    suite.addTests(unittest2.TestLoader().loadTestsFromModule(test_orm))
-    return suite
+fast_suite = [
+    test_ir_sequence,
+]
+
+checks = [
+    test_expression,
+    test_html_sanitize,
+    test_db_cursor,
+    test_orm,
+    test_basecase,
+    test_view_validation,
+    test_misc,
+]
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: