diff options
author | Noemi Vanyi <sitbackandwait@gmail.com> | 2016-04-08 16:38:05 +0200 |
---|---|---|
committer | Noemi Vanyi <sitbackandwait@gmail.com> | 2016-04-09 01:08:44 +0200 |
commit | fe691a09888f6e6c6cc647de06f4eca0feb3451f (patch) | |
tree | b0e554726757290f8eff4bd44541c84dee38479d /tests/unit | |
parent | 9331fc28a8ac2f898a437d126ee59353f7f1bfde (diff) | |
download | searxng-fe691a09888f6e6c6cc647de06f4eca0feb3451f.tar.gz searxng-fe691a09888f6e6c6cc647de06f4eca0feb3451f.zip |
new preferences handling
Preferences class was introduced in order to handle user preferences. Right now
it parses cookies and the form in preferences. Also it can retrieve settings
based on the name of the setting.
ATTENTION
Please note that engine preferences are handled differently from now on. So it
introduces incompatible changes. Every user who has saved preferences should reset and
save his/her settings again.
This change was needed, because everytime a default disabled engine was
added saved user preferences would broke. Now engine setting tracking is
fixed.
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/test_webapp.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/unit/test_webapp.py b/tests/unit/test_webapp.py index 071c01df3..5697017d9 100644 --- a/tests/unit/test_webapp.py +++ b/tests/unit/test_webapp.py @@ -12,7 +12,6 @@ class ViewsTestCase(SearxTestCase): def setUp(self): webapp.app.config['TESTING'] = True # to get better error messages self.app = webapp.app.test_client() - webapp.default_theme = 'default' # set some defaults self.test_results = [ @@ -43,6 +42,11 @@ class ViewsTestCase(SearxTestCase): webapp.Search.search = search_mock + def get_current_theme_name_mock(override=None): + return 'default' + + webapp.get_current_theme_name = get_current_theme_name_mock + self.maxDiff = None # to see full diffs def test_index_empty(self): |