Browse Source

[enh][fix] update to latest dependencies ++ fix tests & travis test runner

WARNING: dependency changes
Adam Tauber 8 years ago
parent
commit
257e52954a

+ 1
- 2
.travis.yml View File

16
   - ./manage.sh update_dev_packages
16
   - ./manage.sh update_dev_packages
17
   - pip install coveralls
17
   - pip install coveralls
18
 script:
18
 script:
19
-  - ./manage.sh pep8_check
20
   - ./manage.sh styles
19
   - ./manage.sh styles
21
   - ./manage.sh grunt_build
20
   - ./manage.sh grunt_build
21
+  - ./manage.sh tests
22
   - ./manage.sh py_test_coverage
22
   - ./manage.sh py_test_coverage
23
-  - ./manage.sh robot_tests
24
 after_success:
23
 after_success:
25
   coveralls
24
   coveralls
26
 notifications:
25
 notifications:

+ 3
- 3
requirements-dev.txt View File

1
-babel==2.2.0
2
-mock==1.0.1
1
+babel==2.3.4
2
+mock==2.0.0
3
 nose2[coverage-plugin]
3
 nose2[coverage-plugin]
4
 pep8==1.7.0
4
 pep8==1.7.0
5
-plone.testing==4.0.15
5
+plone.testing==5.0.0
6
 robotframework-selenium2library==1.7.4
6
 robotframework-selenium2library==1.7.4
7
 robotsuite==1.7.0
7
 robotsuite==1.7.0
8
 transifex-client==0.11
8
 transifex-client==0.11

+ 8
- 8
requirements.txt View File

1
-certifi==2015.11.20.1
2
-flask==0.10.1
3
-flask-babel==0.9
4
-lxml==3.5.0
5
-ndg-httpsclient==0.4.0
1
+certifi==2016.2.28
2
+flask==0.11.1
3
+flask-babel==0.11.1
4
+lxml==3.6.0
5
+ndg-httpsclient==0.4.1
6
 pyasn1==0.1.9
6
 pyasn1==0.1.9
7
 pyasn1-modules==0.0.8
7
 pyasn1-modules==0.0.8
8
-pygments==2.0.2
8
+pygments==2.1.3
9
 pyopenssl==0.15.1
9
 pyopenssl==0.15.1
10
-python-dateutil==2.4.2
10
+python-dateutil==2.5.3
11
 pyyaml==3.11
11
 pyyaml==3.11
12
-requests==2.9.1
12
+requests==2.10.0

+ 1
- 1
searx/engines/__init__.py View File

19
 from os.path import realpath, dirname, splitext, join
19
 from os.path import realpath, dirname, splitext, join
20
 import sys
20
 import sys
21
 from imp import load_source
21
 from imp import load_source
22
-from flask.ext.babel import gettext
22
+from flask_babel import gettext
23
 from operator import itemgetter
23
 from operator import itemgetter
24
 from searx import settings
24
 from searx import settings
25
 from searx import logger
25
 from searx import logger

+ 2
- 2
searx/plugins/__init__.py View File

26
                            tracker_url_remover,
26
                            tracker_url_remover,
27
                            vim_hotkeys)
27
                            vim_hotkeys)
28
 
28
 
29
-required_attrs = (('name', str),
30
-                  ('description', str),
29
+required_attrs = (('name', (str, unicode)),
30
+                  ('description', (str, unicode)),
31
                   ('default_on', bool))
31
                   ('default_on', bool))
32
 
32
 
33
 optional_attrs = (('js_dependencies', tuple),
33
 optional_attrs = (('js_dependencies', tuple),

+ 1
- 1
searx/plugins/https_rewrite.py View File

21
 from os import listdir, environ
21
 from os import listdir, environ
22
 from os.path import isfile, isdir, join
22
 from os.path import isfile, isdir, join
23
 from searx.plugins import logger
23
 from searx.plugins import logger
24
-from flask.ext.babel import gettext
24
+from flask_babel import gettext
25
 from searx import searx_dir
25
 from searx import searx_dir
26
 
26
 
27
 
27
 

+ 1
- 1
searx/plugins/open_results_on_new_tab.py View File

14
 
14
 
15
 (C) 2016 by Adam Tauber, <asciimoo@gmail.com>
15
 (C) 2016 by Adam Tauber, <asciimoo@gmail.com>
16
 '''
16
 '''
17
-from flask.ext.babel import gettext
17
+from flask_babel import gettext
18
 name = gettext('Open result links on new browser tabs')
18
 name = gettext('Open result links on new browser tabs')
19
 description = gettext('Results are opened in the same window by default. '
19
 description = gettext('Results are opened in the same window by default. '
20
                       'This plugin overwrites the default behaviour to open links on new tabs/windows. '
20
                       'This plugin overwrites the default behaviour to open links on new tabs/windows. '

+ 1
- 1
searx/plugins/search_on_category_select.py View File

14
 
14
 
15
 (C) 2015 by Adam Tauber, <asciimoo@gmail.com>
15
 (C) 2015 by Adam Tauber, <asciimoo@gmail.com>
16
 '''
16
 '''
17
-from flask.ext.babel import gettext
17
+from flask_babel import gettext
18
 name = gettext('Search on category select')
18
 name = gettext('Search on category select')
19
 description = gettext('Perform search immediately if a category selected. '
19
 description = gettext('Perform search immediately if a category selected. '
20
                       'Disable to select multiple categories. (JavaScript required)')
20
                       'Disable to select multiple categories. (JavaScript required)')

+ 1
- 1
searx/plugins/self_info.py View File

14
 
14
 
15
 (C) 2015 by Adam Tauber, <asciimoo@gmail.com>
15
 (C) 2015 by Adam Tauber, <asciimoo@gmail.com>
16
 '''
16
 '''
17
-from flask.ext.babel import gettext
17
+from flask_babel import gettext
18
 import re
18
 import re
19
 name = "Self Informations"
19
 name = "Self Informations"
20
 description = gettext('Displays your IP if the query is "ip" and your user agent if the query contains "user agent".')
20
 description = gettext('Displays your IP if the query is "ip" and your user agent if the query contains "user agent".')

+ 1
- 1
searx/plugins/tracker_url_remover.py View File

15
 (C) 2015 by Adam Tauber, <asciimoo@gmail.com>
15
 (C) 2015 by Adam Tauber, <asciimoo@gmail.com>
16
 '''
16
 '''
17
 
17
 
18
-from flask.ext.babel import gettext
18
+from flask_babel import gettext
19
 import re
19
 import re
20
 from urlparse import urlunparse
20
 from urlparse import urlunparse
21
 
21
 

+ 1
- 1
searx/plugins/vim_hotkeys.py View File

1
-from flask.ext.babel import gettext
1
+from flask_babel import gettext
2
 
2
 
3
 name = gettext('Vim-like hotkeys')
3
 name = gettext('Vim-like hotkeys')
4
 description = gettext('Navigate search results with Vim-like hotkeys '
4
 description = gettext('Navigate search results with Vim-like hotkeys '

+ 1
- 1
searx/webapp.py View File

48
     Flask, request, render_template, url_for, Response, make_response,
48
     Flask, request, render_template, url_for, Response, make_response,
49
     redirect, send_from_directory
49
     redirect, send_from_directory
50
 )
50
 )
51
-from flask.ext.babel import Babel, gettext, format_date, format_decimal
51
+from flask_babel import Babel, gettext, format_date, format_decimal
52
 from flask.json import jsonify
52
 from flask.json import jsonify
53
 from searx import settings, searx_dir
53
 from searx import settings, searx_dir
54
 from searx.engines import (
54
 from searx.engines import (

+ 1
- 0
tests/unit/test_webapp.py View File

38
                                                 suggestions=set(),
38
                                                 suggestions=set(),
39
                                                 infoboxes=[],
39
                                                 infoboxes=[],
40
                                                 results=self.test_results,
40
                                                 results=self.test_results,
41
+                                                number_of_results=len(self.test_results),
41
                                                 results_length=lambda: len(self.test_results))
42
                                                 results_length=lambda: len(self.test_results))
42
 
43
 
43
         webapp.Search.search = search_mock
44
         webapp.Search.search = search_mock