From 9ab17e2bbf61062ce8399ef1c51d2069a0cced31 Mon Sep 17 00:00:00 2001 From: Duda Dornelles Date: Fri, 31 Oct 2014 12:17:26 +0100 Subject: moving to twisted --- service/test/unit/controllers/sync_info_controller_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'service/test/unit/controllers/sync_info_controller_test.py') diff --git a/service/test/unit/controllers/sync_info_controller_test.py b/service/test/unit/controllers/sync_info_controller_test.py index d3bf1190..ce9a0dff 100644 --- a/service/test/unit/controllers/sync_info_controller_test.py +++ b/service/test/unit/controllers/sync_info_controller_test.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU Affero General Public License # along with Pixelated. If not, see . import unittest +from mock import MagicMock from pixelated.controllers import SyncInfoController from mockito import * import json @@ -22,6 +23,7 @@ import json class SyncInfoControllerTest(unittest.TestCase): def setUp(self): + self.dummy_request = MagicMock() self.controller = SyncInfoController() def _set_count(self, current, total): @@ -30,7 +32,7 @@ class SyncInfoControllerTest(unittest.TestCase): self.controller.set_sync_info(soledad_sync_data) def get_sync_info(self): - return json.loads(self.controller.sync_info().data) + return json.loads(self.controller.sync_info(self.dummy_request)) def test_is_not_syncing_if_total_is_equal_to_current(self): self._set_count(total=0, current=0) -- cgit v1.2.3