summaryrefslogtreecommitdiff
path: root/searx/tests
diff options
context:
space:
mode:
Diffstat (limited to 'searx/tests')
-rw-r--r--searx/tests/__init__.py0
-rw-r--r--searx/tests/robot/__init__.py0
-rw-r--r--searx/tests/robot/test_basic.robot11
-rw-r--r--searx/tests/test_robot.py24
-rw-r--r--searx/tests/test_unit.py10
5 files changed, 45 insertions, 0 deletions
diff --git a/searx/tests/__init__.py b/searx/tests/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/searx/tests/__init__.py
diff --git a/searx/tests/robot/__init__.py b/searx/tests/robot/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/searx/tests/robot/__init__.py
diff --git a/searx/tests/robot/test_basic.robot b/searx/tests/robot/test_basic.robot
new file mode 100644
index 000000000..9f68d6693
--- /dev/null
+++ b/searx/tests/robot/test_basic.robot
@@ -0,0 +1,11 @@
+*** Settings ***
+Library Selenium2Library timeout=10 implicit_wait=0.5
+Test Setup Open Browser http://localhost:11111/
+Test Teardown Close All Browsers
+
+
+*** Test Cases ***
+Front page
+ Page Should Contain about
+ Page Should Contain preferences
+
diff --git a/searx/tests/test_robot.py b/searx/tests/test_robot.py
new file mode 100644
index 000000000..1480ae8ef
--- /dev/null
+++ b/searx/tests/test_robot.py
@@ -0,0 +1,24 @@
+# -*- 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
diff --git a/searx/tests/test_unit.py b/searx/tests/test_unit.py
new file mode 100644
index 000000000..8d57d0a46
--- /dev/null
+++ b/searx/tests/test_unit.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+
+from searx.testing import SearxTestCase
+
+
+class UnitTestCase(SearxTestCase):
+
+ def test_flask(self):
+ import flask
+ self.assertIn('Flask', dir(flask))