1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-14 16:50:11 +01:00
searxng/searx/tests/test_robot.py
2014-01-14 23:31:15 +01:00

25 lines
636 B
Python

# -*- coding: utf-8 -*-
from plone.testing import layered
from robotsuite import RobotTestSuite
from searx.testing import SEARXROBOTLAYER
import os
import unittest2 as unittest
def test_suite():
suite = unittest.TestSuite()
current_dir = os.path.abspath(os.path.dirname(__file__))
robot_dir = os.path.join(current_dir, 'robot')
tests = [
os.path.join('robot', f) for f in
os.listdir(robot_dir) if f.endswith('.robot') and
f.startswith('test_')
]
for test in tests:
suite.addTests([
layered(RobotTestSuite(test), layer=SEARXROBOTLAYER),
])
return suite