mirror of
https://github.com/SeedSigner/seedsigner.git
synced 2026-10-05 15:08:25 +00:00
Improve test maintainability, camel case
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ def main(sys_argv=None):
|
||||
for module, level in DEFAULT_MODULE_LOG_LEVELS.items():
|
||||
logging.getLogger(module).setLevel(level)
|
||||
|
||||
logger.info(f"Starting Seedsigner with: {args.__dict__}")
|
||||
logger.info(f"Starting SeedSigner with: {args.__dict__}")
|
||||
|
||||
# Get the one and only Controller instance and start our main loop
|
||||
Controller.get_instance().start()
|
||||
|
||||
+3
-3
@@ -12,7 +12,7 @@ from main import main
|
||||
def test_main__argparse__default(patched_controller):
|
||||
main([])
|
||||
assert logging.root.level == logging.INFO
|
||||
assert logging.getLogger().getEffectiveLevel() == 20
|
||||
assert logging.getLogger().getEffectiveLevel() == logging.INFO
|
||||
patched_controller.assert_has_calls(
|
||||
[call.get_instance(), call.get_instance().start()]
|
||||
)
|
||||
@@ -22,7 +22,7 @@ def test_main__argparse__default(patched_controller):
|
||||
def test_main__argparse__enable_debug_logging(patched_controller):
|
||||
main(["--loglevel", "DEBUG"])
|
||||
assert logging.root.level == logging.DEBUG
|
||||
assert logging.getLogger().getEffectiveLevel() == 10
|
||||
assert logging.getLogger().getEffectiveLevel() == logging.DEBUG
|
||||
patched_controller.assert_has_calls(
|
||||
[call.get_instance(), call.get_instance().start()]
|
||||
)
|
||||
@@ -37,4 +37,4 @@ def test_main__argparse__invalid_arg():
|
||||
def test_main__logging__writes_to_stderr(patched_controller, capsys):
|
||||
main([])
|
||||
_, err = capsys.readouterr()
|
||||
assert " INFO [main main (46)]: Starting Seedsigner with: {'loglevel': 'INFO'}" in err
|
||||
assert "Starting SeedSigner" in err and "INFO" in err
|
||||
|
||||
Reference in New Issue
Block a user