diff --git a/helios/datatypes/legacy.py b/helios/datatypes/legacy.py index c2a89dfefbcfcbbf285fc903af7cab769c8ec40a..75f8e8f1747669c2b4e0f943cf52b6f2268c5f2c 100644 --- a/helios/datatypes/legacy.py +++ b/helios/datatypes/legacy.py @@ -180,7 +180,13 @@ class DLogProof(LegacyObject): super(DLogProof,self).__init__(wrapped_obj) class Result(LegacyObject): - pass + WRAPPED_OBJ = list + + def loadDataFromDict(self, d): + self.wrapped_obj = d + + def toDict(self, complete=False): + return self.wrapped_obj class Questions(LegacyObject): WRAPPED_OBJ = list diff --git a/helios/tests.py b/helios/tests.py index 203ff001bd6a5d1597f4c71890ded0499a9d5772..310e549b74fa0e31e3a988723ea6d20fd93da3ed 100644 --- a/helios/tests.py +++ b/helios/tests.py @@ -474,4 +474,4 @@ class ElectionBlackboxTests(TestCase): # check that tally matches response = self.client.get("/helios/elections/%s/result" % election_id) - self.assertEquals(utils.from_json(response.content), [0,1]) + self.assertEquals(utils.from_json(response.content), [[0,1]])