src/pybel/testing/utils.py
def make_dummy_namespaces(manager: Manager, graph: BELGraph) -> None:
    """Make dummy namespaces for the test."""
    for keyword, names in get_names(graph).items():
        graph.namespace_url[keyword] = url = n()

        namespace = Namespace(keyword=keyword, url=url)
        manager.session.add(namespace)

        for name in names:
            entry = NamespaceEntry(name=name, namespace=namespace)
            manager.session.add(entry)

    manager.session.commit()
Make dummy namespaces for the test.
Make dummy namespaces for the test.
Make dummy namespaces for the test .
def make_dummy_namespaces(manager: Manager, graph: BELGraph) -> None:
    for keyword, names in get_names(graph).items():
        graph.namespace_url[keyword] = url = n()
        namespace = Namespace(keyword=keyword, url=url)
        manager.session.add(namespace)
        for name in names:
            entry = NamespaceEntry(name=name, namespace=namespace)
            manager.session.add(entry)
    manager.session.commit()
def make_dummy_namespaces ( manager : Manager , graph : BELGraph ) -> None : for keyword , names in get_names ( graph ) . items ( ) : graph . namespace_url [ keyword ] = url = n ( ) namespace = Namespace ( keyword = keyword , url = url ) manager . session . add ( namespace ) for name in names : entry = NamespaceEntry ( name = name , namespace = namespace ) manager . session . add ( entry ) manager . session . commit ( )
Make dummy namespaces for the test.
Make dummy namespaces for the test .
"""Make dummy namespaces for the test."""
manager
Manager
graph
BELGraph