From ed71ad094635923baab956bae554eb14e8ee5597 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Fri, 17 Feb 2012 16:00:49 +0100 Subject: [PATCH] [FIX] tests: `core` is really `common`. Also added some comments and a second test suite variable for sanity checks. The comments will later be changed to point to some documentation instead. bzr revid: vmt@openerp.com-20120217150049-in1lmo24qay8ulmh --- openerp/tests/__init__.py | 24 +++++++++++++++++++++--- openerp/tests/test_xmlrpc.py | 3 +-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/openerp/tests/__init__.py b/openerp/tests/__init__.py index 6d29053b93c..dbdd2ccd024 100644 --- a/openerp/tests/__init__.py +++ b/openerp/tests/__init__.py @@ -1,14 +1,32 @@ # -*- coding: utf-8 -*- -import unittest2 +""" +Tests for the OpenERP library. + +This module groups a few sub-modules containing unittest2 test cases. + +Some of those test sub-modules are explicitely listed in the `fast_suite` +variable. Most of the tests should be considered fast enough to be included in +that `fast_suite` list and only tests that take a long time to run (e.g. more +than a minute) should not be listed. + +Some other test sub-modules are sanity checks explicitely listed in the +`checks` variable. These test sub-modules are invariants that must be +full-filled at any time. They are expected to always pass: obviously they must +pass right after the module is installed, but they must also pass after any +other module is installed, after a migration, or even after the database was +put in production for a few months. +""" import test_orm import test_ir_sequence import test_xmlrpc -# Explicit declaration list of test sub-modules. -suite = [ +fast_suite = [ test_xmlrpc, # Creates a database test_ir_sequence, # Assume an existing database + ] + +checks = [ test_orm, # Assume an existing database ] diff --git a/openerp/tests/test_xmlrpc.py b/openerp/tests/test_xmlrpc.py index c24d6ba706e..dfed851dbe3 100644 --- a/openerp/tests/test_xmlrpc.py +++ b/openerp/tests/test_xmlrpc.py @@ -12,7 +12,6 @@ import xmlrpclib import openerp import common -import core DB = common.DB ADMIN_USER = common.ADMIN_USER @@ -23,7 +22,7 @@ setUpModule = common.start_openerp tearDownModule = common.stop_openerp -class test_xmlrpc(core.RpcCase): +class test_xmlrpc(common.RpcCase): def test_00_xmlrpc_create_database_polling(self): """