diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2015-06-12 15:48:04 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2015-06-12 15:48:04 -0300 |
commit | 42aa76d8463ffe73d5e22d178f8414cfdbd2730e (patch) | |
tree | 1a7a4377b8c91d495d3755f3ebe6d3f8bb10dcce /service/test | |
parent | 761f4c1232601cb22ce57c38b904c0866f31c577 (diff) |
[refactor] SearchEngine does not need a querier
It was used only to retrieve encryption key. This should be done by who
is using it.
Diffstat (limited to 'service/test')
-rw-r--r-- | service/test/support/integration/app_test_client.py | 2 | ||||
-rw-r--r-- | service/test/unit/adapter/search/test_search.py | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/service/test/support/integration/app_test_client.py b/service/test/support/integration/app_test_client.py index 06c0fd9c..52372507 100644 --- a/service/test/support/integration/app_test_client.py +++ b/service/test/support/integration/app_test_client.py @@ -62,7 +62,7 @@ class AppTestClient(object): self.soledad_querier = self._create_soledad_querier(self.soledad, self.INDEX_KEY) self.keymanager = mock() - self.search_engine = SearchEngine(self.soledad_querier, agent_home=soledad_test_folder) + self.search_engine = SearchEngine(self.INDEX_KEY, agent_home=soledad_test_folder) self.mail_sender = self._create_mail_sender() self.account = SoledadBackedAccount(self.ACCOUNT, self.soledad, MagicMock()) diff --git a/service/test/unit/adapter/search/test_search.py b/service/test/unit/adapter/search/test_search.py index 491cb2fc..1d9076a2 100644 --- a/service/test/unit/adapter/search/test_search.py +++ b/service/test/unit/adapter/search/test_search.py @@ -16,7 +16,6 @@ import unittest -from mockito import mock, when from pixelated.adapter.search import SearchEngine from tempdir import TempDir from test.support import test_helper @@ -47,10 +46,7 @@ class SearchEngineTest(unittest.TestCase): def test_encoding(self): # given - soledad_querier = mock() - when(soledad_querier).get_index_masterkey().thenReturn(INDEX_KEY) - - se = SearchEngine(soledad_querier, self.agent_home) + se = SearchEngine(INDEX_KEY, self.agent_home) headers = { 'From': 'foo@bar.tld', |