on 3bb97fc help sign in
searx/tests/test_robot.py
23 lines 635 B history raw
1# -*- coding: utf-8 -*-
3import os
4import unittest2 as unittest
5from plone.testing import layered
6from robotsuite import RobotTestSuite
7from searx.testing import SEARXROBOTLAYER
10def test_suite():
11 suite = unittest.TestSuite()
12 current_dir = os.path.abspath(os.path.dirname(__file__))
13 robot_dir = os.path.join(current_dir, 'robot')
14 tests = [
15 os.path.join('robot', f) for f in
16 os.listdir(robot_dir) if f.endswith('.robot') and
17 f.startswith('test_')
18 ]
19 for test in tests:
20 suite.addTests([
21 layered(RobotTestSuite(test), layer=SEARXROBOTLAYER),
22 ])
23 return suite