forked from tarassh/eos-ledger
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Add automated functional test based on ragger framework
- Loading branch information
Xavier Chapron
committed
Nov 14, 2022
1 parent
7803bcc
commit 7a2c32e
Showing
598 changed files
with
1,117 additions
and
804 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import sys | ||
import json | ||
import argparse | ||
|
||
from pathlib import Path | ||
|
||
REPO_ROOT_DIRECTORY = Path(__file__).parent | ||
EOS_LIB_DIRECTORY = (REPO_ROOT_DIRECTORY / "../tests/functional/apps").resolve().as_posix() | ||
sys.path.append(EOS_LIB_DIRECTORY) | ||
from eos_transaction_builder import Transaction | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument('--file', help="Transaction in JSON format") | ||
args = parser.parse_args() | ||
|
||
if args.file is None: | ||
args.file = '../tests/corpus/transaction.json' | ||
|
||
with open(args.file) as f: | ||
obj = json.load(f) | ||
signing_digest, message = Transaction().encode(obj) | ||
|
||
with open(args.file.replace(".json", ".bin"), 'wb') as out: | ||
out.write(message) |
Oops, something went wrong.