2024-02-05 07:47:36 +01:00
|
|
|
from unittest import TestCase
|
|
|
|
|
|
2024-02-05 09:04:02 +01:00
|
|
|
from mixnet.test_utils import init_robustness_mixnet_config
|
2024-02-05 07:47:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestRobustness(TestCase):
|
|
|
|
|
def test_build_topology(self):
|
2024-02-05 09:04:02 +01:00
|
|
|
robustness_mixnet_config = init_robustness_mixnet_config()
|
|
|
|
|
topology = robustness_mixnet_config.mixnet_layer_config.topology
|
|
|
|
|
topology_size = robustness_mixnet_config.topology_size
|
2024-02-05 07:47:36 +01:00
|
|
|
|
2024-02-05 09:04:02 +01:00
|
|
|
self.assertEqual(len(topology.layers), topology_size.num_layers)
|
2024-02-05 07:47:36 +01:00
|
|
|
for layer in topology.layers:
|
2024-02-05 09:04:02 +01:00
|
|
|
self.assertEqual(len(layer), topology_size.num_mixnodes_per_layer)
|