mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
16 lines
536 B
Python
16 lines
536 B
Python
# Copyright BigchainDB GmbH and BigchainDB contributors
|
|
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
|
|
|
import pytest
|
|
|
|
from bigchaindb.upsert_validator import ValidatorElection
|
|
|
|
|
|
@pytest.fixture
|
|
def valid_election_b(b, node_key, new_validator):
|
|
voters = ValidatorElection.recipients(b)
|
|
return ValidatorElection.generate([node_key.public_key],
|
|
voters,
|
|
new_validator, None).sign([node_key.private_key])
|