summaryrefslogtreecommitdiff
path: root/service/test/unit/controllers/sync_info_controller_test.py
diff options
context:
space:
mode:
authorDuda Dornelles <ddornell@thoughtworks.com>2014-10-31 12:17:26 +0100
committerDuda Dornelles <ddornell@thoughtworks.com>2014-11-05 18:02:32 -0200
commit9ab17e2bbf61062ce8399ef1c51d2069a0cced31 (patch)
tree4079dcbd6f4fe5c485595491f4fb874e3898bc1c /service/test/unit/controllers/sync_info_controller_test.py
parent0bfc4824189807c7a8971093910ced527b4e6a29 (diff)
moving to twisted
Diffstat (limited to 'service/test/unit/controllers/sync_info_controller_test.py')
-rw-r--r--service/test/unit/controllers/sync_info_controller_test.py4
1 files changed, 3 insertions, 1 deletions
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 <http://www.gnu.org/licenses/>.
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)