Adds cli unit tests

This commit is contained in:
Sergi Delgado Segura
2020-03-21 22:01:49 +01:00
parent 3d389a92ac
commit 2587e25637
2 changed files with 27 additions and 14 deletions

View File

@@ -1,6 +1,10 @@
import pytest
import random
from cli import DEFAULT_CONF
from common.config_loader import ConfigLoader
@pytest.fixture(scope="session", autouse=True)
def prng_seed():
@@ -11,3 +15,10 @@ def get_random_value_hex(nbytes):
pseudo_random_value = random.getrandbits(8 * nbytes)
prv_hex = "{:x}".format(pseudo_random_value)
return prv_hex.zfill(2 * nbytes)
def get_config():
config_loader = ConfigLoader(".", "teos_cli.conf", DEFAULT_CONF, {})
config = config_loader.build_config()
return config