This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
collective.contact.core/src/collective/contact/core/tests/test_robot.py

25 lines
633 B
Python

import os
import unittest
import robotsuite
from plone.testing import layered
from ..testing import ACCEPTANCE
def test_suite():
suite = unittest.TestSuite()
current_dir = os.path.abspath(os.path.dirname(__file__))
robot_dir = os.path.join(current_dir, 'robot')
robot_tests = [
os.path.join('robot', doc) for doc in os.listdir(robot_dir)
if doc.endswith('.robot') and doc.startswith('test_')
]
for test in robot_tests:
suite.addTests([
layered(
robotsuite.RobotTestSuite(test),
layer=ACCEPTANCE
),
])
return suite