Commit 4bacaa20 authored by Jérome Perrin's avatar Jérome Perrin

Merge !534 Do not suggest bad practices in new test component template

Numbering tests can be used to control test execution order, but developers should write independent tests that should not rely on test execution order.

`getTitle` is useless. Test runner will print the class name.

/reviewed-on nexedi/erp5!534
parents 01166a1d d67a0763
......@@ -210,9 +210,6 @@ class Test(ERP5TypeTestCase):
A Sample Test Class
"""
def getTitle(self):
return "SampleTest"
def getBusinessTemplateList(self):
"""
Tuple of Business Templates we need to install
......@@ -226,16 +223,15 @@ class Test(ERP5TypeTestCase):
# here, you can create the categories and objects your test will depend on
pass
def test_01_sampleTest(self):
def test_sampleTest(self):
"""
A Sample Test
For the method to be called during the test,
its name must start with 'test'.
The '_01_' part of the name is not mandatory,
it just allows you to define in which order the tests are to be launched.
Tests methods (self.assert... and self.failIf...)
are defined in /usr/lib/python/unittest.py.
See https://docs.python.org/2/library/unittest.html for help with available
assertion methods.
"""
self.assertEqual(0, 1)
''' % DEFAULT_TEST_TEMPLATE_COPYRIGHT
......
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