Commit 3a43ca13 authored by Rafael Monnerat's avatar Rafael Monnerat

Add SlapOSDoc test suite class to tests/__init__.py

See merge request !312
parents 94c9a1fa 4f7ff125
......@@ -126,3 +126,26 @@ class SlapOSCloud(SavedTestSuite, ProjectTestSuite):
status_dict['test_count'] = int(group_dict['total'])
status_dict['skip_count'] = int(group_dict['expected_failure'])
return status_dict
class SlapOSDocTestSuite(SlapOSCloud):
_product_list = []
_saved_test_id = 'erp5_slapos_tutorial:testFunctionalStandaloneSlapOSTutorial'
_bt_list = ['erp5_slapos_tutorial']
def getTestList(self):
test_list = []
path = sys.path[0]
erp5_doc_path = sys.path[1]
component_re = re.compile(".*/([^/]+)/TestTemplateItem/portal_components"
"/test\.[^.]+\.([^.]+).py$")
for test_path in (
glob('%s/bt5/*/TestTemplateItem/portal_components/test.*.test*.py' % erp5_doc_path)):
component_re_match = component_re.match(test_path)
if component_re_match is not None:
test_case = "%s:%s" % (component_re_match.group(1),
component_re_match.group(2))
else:
test_case = test_path.split(os.sep)[-1][:-3] # remove .py
test_list.append(test_case)
return test_list
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