mirror of
https://github.com/searxng/searxng.git
synced 2024-11-27 05:11:03 +00:00
[fix] robot tests
This commit is contained in:
parent
0fbd705259
commit
472a409022
2 changed files with 12 additions and 5 deletions
|
@ -1,5 +1,6 @@
|
|||
general:
|
||||
debug : False
|
||||
instance_name : "searx_test"
|
||||
|
||||
search:
|
||||
safe_search : 0
|
||||
|
@ -25,10 +26,12 @@ engines:
|
|||
- name : general_dummy
|
||||
engine : dummy
|
||||
categories : general
|
||||
shortcut : gd
|
||||
|
||||
- name : dummy_dummy
|
||||
engine : dummy
|
||||
categories : dummy
|
||||
shortcut : dd
|
||||
|
||||
locales:
|
||||
en : English
|
||||
|
|
|
@ -57,7 +57,7 @@ class SearxRobotLayer(Layer):
|
|||
)
|
||||
|
||||
def tearDown(self):
|
||||
os.kill(self.server.pid, 15)
|
||||
os.kill(self.server.pid, 9)
|
||||
# remove previously set environment variable
|
||||
del os.environ['SEARX_SETTINGS_PATH']
|
||||
|
||||
|
@ -78,7 +78,11 @@ if __name__ == '__main__':
|
|||
|
||||
base_dir = abspath(join(dirname(__file__), '../tests'))
|
||||
if sys.argv[1] == 'robot':
|
||||
Runner(['--color',
|
||||
'--auto-progress',
|
||||
'--path', base_dir],
|
||||
found_suites=[test_suite()]).run()
|
||||
r = Runner(['--color',
|
||||
'--auto-progress',
|
||||
'--stop-on-error',
|
||||
'--path',
|
||||
base_dir],
|
||||
found_suites=[test_suite()])
|
||||
r.run()
|
||||
sys.exit(int(r.failed))
|
||||
|
|
Loading…
Reference in a new issue