diff --git a/helios/fixtures/legacy-trustees-expected.json b/helios/fixtures/legacy-trustees-expected.json new file mode 100644 index 0000000000000000000000000000000000000000..717cfa4f3cc04d2a5c7218ecdd73d04c5081ef40 --- /dev/null +++ b/helios/fixtures/legacy-trustees-expected.json @@ -0,0 +1 @@ +[{"decryption_factors": [["6472995696323449481761379982226987034204671847521280173533677671800764813049225642765553350990023913842413237138994293559420693903825662068604923689287872415577051463244183680254762458861919465321996886414454802637697911164542594307379406907302286457272189409620028333641643603878239149886302645287899635957429604613780743866054390180292694767552575334318878336726590042824600404857161528120082698503521888035480554396084523318391075327196170151150017179381762494738064997274952677744062885141254893966429696256647729546503511682475164521390015781174526069960261297951569915608591534531987906457590536635969717163017", "4694987036530822221969862722934807245252033236096286470958607647670667339966405067211401183900486152849338828231866947753384000515948363917537698461367938226635095051908983060837577141637079223791250760708100706116554435071563140176091228666812675154652983071813350108415009127448215287774568670658220922979555810609621103674935794988428755665984799963804061832930765121869645042320772546611747793882117497557727049006950340697861932746306602015638014326057316264719067026691985946612284378220471949526380850668823330863033387059030694538020710485275895898243819680400129463078761698466522349987023411487281520474883", "10295246473033461943758026743789596939350509698742039970315795780884125241389014443917881746198829796581532942808439005949283365779117479508160568372317140210333337134392167953936839851684527674630949696312674486436145278957756779729314631536871251419768935267394895633742684422354002503367119198418556623190787101973681238871389852824878971817620102647834188822139335392978368269353706515717026270035928407046024774088938767955368659221078544511315129408774954569106438025396242766355252175143630049198659910228039324058865260398970570436187058310718047632290796972241903647262820809895006837802544169684965043985217"]], "decryption_proofs": [[{"challenge": "1380551719414920400171525057971082717628333383331", "commitment": {"A": "7507017710713706541866854087239255878832243462282927934861869264579266153414135774039907501610333661411307392124516064716169762187793122422653392413694719341072929833428803311467184790384552952122962719439993321491850563305827711174757159530056482044086113086278819776836755900476312486344691968144982867821153845953505709371731535352078308509107142372383678069818043698670113799637374050281502657094511525050466016215603846575745518886258884256517535305086140932732185093382337472216944115745914507235107089359391149241488464243538039888427232320387045242147289454894324102498622240371772307962377543359644138050732", "B": "9380537358717287794361139802208298689612038093915331354273755926136271364418368655784719731999399724919985020788675784918253914203053520739646207663258321982296961284260527867979102137369345188902946846882488328401755614672409311174738591638094760071468127665833627085404365535363865725138469740172195165916006849929747492989908204997577576884613794053639111878642291186924488222075700172352004236504102819795276258902217943337913405984290899494969828003129050711264077492215521097345600028545889724146142447720830350928361819900593545829887714375518026393470442073999043111656408350218492657773508327008142722765323"}, "response": "14968183763730862563804542741411408992850421513002294375208895154010692113473"}, {"challenge": "928781902643353178142869485767256501013266757862", "commitment": {"A": "15633563423080526706419747992138418264348782035013504564013594194243510158773485945327967048961356486383215212483462348169538997687212412994065370129208651376716134738309040011956812348225502246726068743645442345760299758855171800338513471629907181869261235290967637848308843443030196462480968462064736152282506400094906707590048929424501814668795548146042465351489547617128013409539657112623382498325505218672820602470148627899073221474369783740192103073229959882697932789244332982166130368921202267521575861224848623085043804713412700008533796217785099336299831697244176527202186978470212364757532134819680354563148", "B": "12096486616787847940422910780868545368459722844257079241138940841283178564454214852156457535709117643371874960603512077501609448142224981337250893956754326973500016429330818806066472007235463129546869618768400286717676281057649118636738883493045882628597975596370121648765372944460751900559383299236537662147422350456179701023239887170947370958443802128313476878264884880050610028894804375661112294041896485336368667604232816382543157191078316625625754668916289488659228524702708688069886061853971910775735555019155194573765265940727358626391662769501006863366189078852671910748052355802446751747021021118425535805993"}, "response": "28211487355296799049673241288040839050179434119064067463499443482498217208519"}, {"challenge": "1185875285287724841734729620564063765892683320674", "commitment": {"A": "7001208902949083725612528497286173590963128243388233050364170894167119730650686852382051453769934272573826748192906372573117172855830955054429366729378203493623800707261267780120888516763713550790929472508859603645362641253784170132183853580904592671772431762071089997631711457767213127284054889939710921678409142902073069362109320972478847445503275495123009954969192201274037955597083943422722576587379742825967553563854890578564608501050212319484234660576151814389620150885481795600159904595945676049646628070476825084214555838090776625145999421406237953264094965910871533178888382695722903443177374943370529435835", "B": "9283256001439934493735625502538426523693868357198892770123498611555555299897475884431602692985751553635974299868188199546120099533813550264738209145580148682133736994277447303232404855460267466835171618461494856527451536401919045811368542455888163074798675752166973030905486052563091739924121583631082909857054169008129824182126348494239756670544488941688557994938824882239628149105470894355324069394350165968806256153572521355852908171187431792943362931378932369391344262912306194221041082329544009406130999320321982717816319748626422183292293407260745830456452071148377105696849366938448681719121826747318585394449"}, "response": "35940004930824655560273271912769310469877395464343390517827902063029021070522"}]], "email": "ben@adida.net", "pok": {"challenge": "1332480086668557441201643372581202887936359529158", "commitment": "7293717602937930303539334035585992874848225578069230321020475395302271618251676625339394037113615768448191844038177138377398628710618534554579159024696839244259150329975275908657630895950271024845960009174103501808710068228131410574426743388071115904258299345649002261830811651722360713255177643626318539836219484536768879576493216269723082810883816923164505226562312363786695925147039779580512980526559772797170383031088424275717164298259873455954031483604235513390512830986257955559268237959148131455635082412955562162650368183295042919718548235596451502134150497646725301296162346004092475784579091583032361772546", "response": "36391699599264859021278138939148792146348548118365171047783454096022492035033"}, "public_key": {"g": "14887492224963187634282421537186040801304008017743492304481737382571933937568724473847106029915040150784031882206090286938661464458896494215273989547889201144857352611058572236578734319505128042602372864570426550855201448111746579871811249114781674309062693442442368697449970648232621880001709535143047913661432883287150003429802392229361583608686643243349727791976247247948618930423866180410558458272606627111270040091203073580238905303994472202930783207472394578498507764703191288249547659899997131166130259700604433891232298182348403175947450284433411265966789131024573629546048637848902243503970966798589660808533", "p": "16328632084933010002384055033805457329601614771185955389739167309086214800406465799038583634953752941675645562182498120750264980492381375579367675648771293800310370964745767014243638518442553823973482995267304044326777047662957480269391322789378384619428596446446984694306187644767462460965622580087564339212631775817895958409016676398975671266179637898557687317076177218843233150695157881061257053019133078545928983562221396313169622475509818442661047018436264806901023966236718367204710755935899013750306107738002364137917426595737403871114187750804346564731250609196846638183903982387884578266136503697493474682071", "q": "61329566248342901292543872769978950870633559608669337131139375508370458778917", "y": "10209996196141455592954150806595590302779517452973425513133143319891192812034378656046616286290215682512560281253780168350968078321298815359346112476103153663350347613425264137270664984993821707972591603600995748437418960965874687695519139184521329861807151368087170846679616051889191498465971754449242176181010116247194146889436200685706775658837872315899212063389435005791600156232673825152649290306522408636413180876447424057387927560622286232455842226141935616726284027452689619467330786904141326022591988410271656808992679125143841590661998535192138516435006042519265859141061154934003554664919161933342577547196"}, "public_key_hash": "hSeyI5ZlWhNshRfur8uhRHxqbi/vVqKGb4P+FdUnR8o", "uuid": "4269f398-0eae-4351-9027-c2d9ee1767c3"}] \ No newline at end of file diff --git a/helios/tests.py b/helios/tests.py index a43f083fb5040fb8fe52663cccaeab4e4f68b20d..3c5c9fcb5519cee396158ab6ea21bebbac9af418 100644 --- a/helios/tests.py +++ b/helios/tests.py @@ -221,6 +221,7 @@ class LegacyElectionBlackboxTests(TestCase): fixtures = ['legacy-data.json'] EXPECTED_ELECTION_FILE = 'helios/fixtures/legacy-election-expected.json' EXPECTED_VOTERS_FILE = 'helios/fixtures/legacy-election-voters-expected.json' + EXPECTED_TRUSTEES_FILE = 'helios/fixtures/legacy-trustees-expected.json' def setUp(self): self.election = models.Election.objects.all()[0] @@ -238,6 +239,10 @@ class LegacyElectionBlackboxTests(TestCase): response = self.client.get("/helios/elections/%s/voters/" % self.election.uuid, follow=False) self.assertEqualsToFile(response, self.EXPECTED_VOTERS_FILE) + def test_trustees_list(self): + response = self.client.get("/helios/elections/%s/trustees/" % self.election.uuid, follow=False) + self.assertEqualsToFile(response, self.EXPECTED_TRUSTEES_FILE) + class ElectionBlackboxTests(TestCase): fixtures = ['users.json', 'election.json']