2023-01-15 02:32:13 +00:00
|
|
|
""" Utility functions for tests
|
|
|
|
"""
|
|
|
|
from fediblockhole import setup_argparse, augment_args
|
|
|
|
|
|
|
|
def shim_argparse(testargv: list=[], tomldata: str=None):
|
|
|
|
"""Helper function to parse test args
|
|
|
|
"""
|
|
|
|
ap = setup_argparse()
|
|
|
|
args = ap.parse_args(testargv)
|
2023-07-08 21:29:06 +00:00
|
|
|
if tomldata is not None:
|
|
|
|
args = augment_args(args, tomldata)
|
2023-01-15 02:32:13 +00:00
|
|
|
return args
|