summaryrefslogtreecommitdiff
path: root/addons/web/tests
diff options
context:
space:
mode:
authorXavier-Do <xdo@odoo.com>2019-07-01 15:32:45 +0000
committerXavier-Do <xdo@odoo.com>2019-07-11 09:03:14 +0000
commit95b4f2ab4b5698ab3a28c9c35ac8da6fb6def983 (patch)
treef863a0f5f2933556f59c7e2aa4bcafdfed9029f5 /addons/web/tests
parentb8f4ad585e9eedb3bb71559e5948dfacc9dfb3a5 (diff)
[IMP] core: improve test_tags
Add the support to be able to specify exlicitely module, class and method name in test_tags Before this commit, there is no distinction between module tag and test tag. Meaning that --test-tag module_name will replace the default +standard tag and execute all test of the module. This commit tries to keep the initial behaviour, while addind new features, like explicit modules tag with /module_name, as well as class (:class) and method (.method) Some usage examples: --test_tags /module will execute all standard test of module --test_tags :class will execute all standard test with class name 'class' --test_tags .method will execute all standard test with method name 'method' --test_tags external/module will execute all external test of module --test_tags */module will execute all tests of module, --test_tags */module,-standard will execute all non standard tests of module, --test_tags -/website:TestUiTranslate.test_admin_tour_rte_translator will disable only rte translator test closes odoo/odoo#34756 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'addons/web/tests')
-rw-r--r--addons/web/tests/test_menu.py7
-rw-r--r--addons/web/tests/test_serving_base.py6
2 files changed, 4 insertions, 9 deletions
diff --git a/addons/web/tests/test_menu.py b/addons/web/tests/test_menu.py
index e608196ecd0..d60721c162a 100644
--- a/addons/web/tests/test_menu.py
+++ b/addons/web/tests/test_menu.py
@@ -1,13 +1,10 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
-from odoo.tests.common import tagged
-import unittest
-
+from odoo.tests.common import BaseCase
from ..controllers import main
-@tagged('standard', 'at_install')
-class ActionMungerTest(unittest.TestCase):
+class ActionMungerTest(BaseCase):
def test_actual_treeview(self):
action = {
"views": [[False, "tree"], [False, "form"],
diff --git a/addons/web/tests/test_serving_base.py b/addons/web/tests/test_serving_base.py
index b66d2d5b266..e1c6c7d5ab0 100644
--- a/addons/web/tests/test_serving_base.py
+++ b/addons/web/tests/test_serving_base.py
@@ -2,9 +2,8 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import random
-import unittest
-from odoo.tests.common import tagged
+from odoo.tests.common import BaseCase
from odoo.tools import topological_sort
@@ -14,8 +13,7 @@ def sample(population):
random.randint(0, min(len(population), 5)))
-@tagged('standard', 'at_install')
-class TestModulesLoading(unittest.TestCase):
+class TestModulesLoading(BaseCase):
def setUp(self):
self.mods = [str(i) for i in range(1000)]