def test_run_simulator_genesis(self, get_key_dir_fn, get_data_dir_fn, mock_consensus_state_store): """Test generating a Validator Registry transaction, which is written to a file. This test executes the `poet genesis` command. The expected output is: - a BatchList written to a file at <temp_dir>/poet_genesis.batch - the serialized sealed signup data is written to the consensus state store with key of NULL_BLOCK_IDENTIFIER """ mock_consensus_state_store.return_value = self._consensus_state_store get_data_dir_fn.return_value = self._temp_dir get_key_dir_fn.return_value = self._temp_dir pubkey = self._create_key() main('poet', args=[ 'genesis', '-o', os.path.join(self._temp_dir, 'poet-genesis.batch') ]) self._assert_validator_transaction(pubkey, 'poet-genesis.batch') self._assert_sealed_signup_data()
def test_run_simulator_genesis(self, get_key_dir_fn, get_data_dir_fn, mock_store): """Test generating a Validator Registry transaction, which is written to a file. This test executes the `poet genesis` command. The expected output is: - a BatchList written to a file at <temp_dir>/poet_genesis.batch - the serialized sealed signup data is written to the key state store """ mock_store.return_value = self._store get_data_dir_fn.return_value = self._temp_dir get_key_dir_fn.return_value = self._temp_dir pubkey = self._create_key() main('poet', args=['genesis', '-o', os.path.join(self._temp_dir, 'poet-genesis.batch')]) self._assert_validator_transaction(pubkey, 'poet-genesis.batch')
def test_run_simulator_genesis(self, get_key_dir_fn, get_data_dir_fn, mock_store): """Test generating a Validator Registry transaction, which is written to a file. This test executes the `poet registration create` command. The expected output is: - a BatchList written to a file at <temp_dir>/poet_genesis.batch - the serialized sealed signup data is written to the key state store """ mock_store.return_value = self._store get_data_dir_fn.return_value = self._temp_dir get_key_dir_fn.return_value = self._temp_dir public_key = self._create_key() main('poet', args=[ 'registration', 'create', '-o', os.path.join(self._temp_dir, 'poet-genesis.batch') ]) self._assert_validator_transaction(public_key, 'poet-genesis.batch')