def test_read_metadata(): """Tests reading metadata yaml file.""" nb_md, docs = read_mod_metadata(host_summary.__file__, host_summary.__name__) check.is_instance(nb_md, NBMetadata) check.is_instance(docs, dict) opts = nb_md.get_options("all") check.is_in("heartbeat", [opt[0] for opt in opts]) check.is_in("alerts", [opt[0] for opt in opts]) for item in ("Default Options", "alerts", "azure_api"): check.is_in(item, nb_md.options_doc) for item in ("Default Options", "alerts", "azure_api"): check.is_in(item, nb_md.options_doc)
import pandas as pd from msticpy.nbtools import entities from msticpy.common.timespan import TimeSpan from msticnb.common import nb_print, set_text from msticnb.notebooklet import Notebooklet, NotebookletResult, NBMetadata from msticnb import nb_metadata from msticnb._version import VERSION __version__ = VERSION __author__ = "Ian Hellen" _CLS_METADATA: NBMetadata _CELL_DOCS: Dict[str, Any] _CLS_METADATA, _CELL_DOCS = nb_metadata.read_mod_metadata(__file__, __name__) # pylint: disable=too-few-public-methods class TstSummaryResult(NotebookletResult): """Test Results.""" def __init__( self, description: Optional[str] = None, timespan: Optional[TimeSpan] = None, notebooklet: Optional["Notebooklet"] = None, ): """ Create new Notebooklet result instance.