[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
This commit is contained in:
Vo Minh Thu
2012-02-17 16:00:49 +01:00
parent 0037575619
commit ed71ad0946
2 changed files with 22 additions and 5 deletions
+21 -3
View File
@@ -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
]
+1 -2
View File
@@ -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):
"""