def test_primaries_selection_viewno_9(primary_selector):
    validators = ["Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta"]
    primary_selector = RoundRobinConstantNodesPrimariesSelector(validators)
    master_primary = primary_selector.select_master_primary(view_no=9)
    primaries = primary_selector.select_primaries(view_no=9)
    assert master_primary == "Gamma"
    assert primaries == ["Gamma", "Delta", "Epsilon"]
Example #2
0
def test_primaries_selection_viewno_5(primary_selector):
    validators = ["Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta"]
    primary_selector = RoundRobinConstantNodesPrimariesSelector(validators)
    primaries = primary_selector.select_primaries(view_no=5)
    assert primaries == ["Zeta", "Eta", "Alpha"]