def test_view_change_primary_selection(validators, initial_view_no):
    primary = ViewChangeService._find_primary(validators, initial_view_no)
    prev_primary = ViewChangeService._find_primary(validators,
                                                   initial_view_no - 1)
    next_primary = ViewChangeService._find_primary(validators,
                                                   initial_view_no + 1)

    assert primary in validators
    assert prev_primary in validators
    assert next_primary in validators

    assert primary != prev_primary
    assert primary != next_primary
Beispiel #2
0
 def _primary_in_view(view_no):
     return ViewChangeService._find_primary(validators, view_no)