changeset 1562:421137efef93

BeDOZa: Factored out parameter to common super class.
author Thomas P Jakobsen <tpj@cs.au.dk>
date Thu, 30 Sep 2010 10:26:11 +0200
parents 0e4476f175bb
children cb568167b140
files viff/test/bedoza/test_bedoza_runtime.py viff/test/bedoza/test_bedoza_triple.py viff/test/bedoza/test_zero_knowledge.py viff/test/bedoza/util.py
diffstat 4 files changed, 2 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/viff/test/bedoza/test_bedoza_runtime.py	Thu Sep 30 10:16:01 2010 +0200
+++ b/viff/test/bedoza/test_bedoza_runtime.py	Thu Sep 30 10:26:11 2010 +0200
@@ -40,10 +40,6 @@
 
 
 class BeDOZaBasicCommandsTest(BeDOZaTestCase):
-    """Test for basic commands."""
-
-    # Number of players.
-    num_players = 3
 
     timeout = 3
 
--- a/viff/test/bedoza/test_bedoza_triple.py	Thu Sep 30 10:16:01 2010 +0200
+++ b/viff/test/bedoza/test_bedoza_triple.py	Thu Sep 30 10:26:11 2010 +0200
@@ -49,7 +49,6 @@
 
 
 class DataTransferTest(BeDOZaTestCase):
-    num_players = 3
 
     @protocol
     def test_convolute_int(self, runtime):
@@ -80,7 +79,6 @@
 
 
 class ModifiedPaillierTest(BeDOZaTestCase):
-    num_players = 3
 
     @protocol
     def test_modified_paillier_can_decrypt_encrypted_one(self, runtime):
@@ -200,7 +198,6 @@
     return gen.generate_random_shares(n)
 
 class PartialShareGeneratorTest(BeDOZaTestCase):
-    num_players = 3
  
     @protocol
     def test_shares_have_correct_type(self, runtime):
@@ -271,7 +268,6 @@
         return shares
 
 class ShareGeneratorTest(BeDOZaTestCase):
-    num_players = 3
 
     @protocol
     def test_encrypted_real_share_open_correctly(self, runtime):
@@ -318,7 +314,6 @@
         return gather_shares(results)
 
 class AddMacsTest(BeDOZaTestCase): 
-    num_players = 3
 
     timeout = 10
 
@@ -384,7 +379,6 @@
 # 
 
 class TripleTest(BeDOZaTestCase): 
-    num_players = 3
 
     timeout = 25
 
@@ -435,7 +429,6 @@
         return d
 
 class MulTest(BeDOZaTestCase): 
-    num_players = 3
 
     timeout = 10
         
@@ -513,7 +506,6 @@
 
 
 class FullMulTest(BeDOZaTestCase): 
-    num_players = 3
 
     timeout = 10
         
--- a/viff/test/bedoza/test_zero_knowledge.py	Thu Sep 30 10:16:01 2010 +0200
+++ b/viff/test/bedoza/test_zero_knowledge.py	Thu Sep 30 10:26:11 2010 +0200
@@ -40,8 +40,6 @@
 
 class BeDOZaZeroKnowledgeTest(BeDOZaTestCase):
 
-    num_players = 3
-
     def test_zk_matrix_entries_are_correct(self):
         s, k, prover_id = 5, 1, 1
         c = [None] * s
--- a/viff/test/bedoza/util.py	Thu Sep 30 10:16:01 2010 +0200
+++ b/viff/test/bedoza/util.py	Thu Sep 30 10:26:11 2010 +0200
@@ -32,6 +32,8 @@
 
 class BeDOZaTestCase(RuntimeTestCase):
 
+    num_players = 3
+
     runtime_class = BeDOZaRuntime
 
     # In production, paillier keys should be something like 2000