Fixed #20: I can parse simple concepts

This commit is contained in:
2023-07-09 18:08:47 +02:00
parent ba397b0b72
commit 57f9ce2bbb
44 changed files with 2462 additions and 149 deletions
+8 -1
View File
@@ -1,8 +1,12 @@
import inspect
import pytest
from helpers import GetNextId
from server.authentication import User
DEFAULT_ONTOLOGY_NAME = "current_test_"
@pytest.fixture(scope="session")
def sheerka():
@@ -75,12 +79,15 @@ class NewOntology:
"""
from core.ExecutionContext import ExecutionContext
def __init__(self, context: ExecutionContext, name="current_test"):
def __init__(self, context: ExecutionContext, name=None):
self.sheerka = context.sheerka
self.context = context
self.name = name
self.ontology = None
if self.name is None:
self.name = inspect.stack()[1][3]
def __enter__(self):
self.ontology = self.sheerka.om.push_ontology(self.name)
return self.ontology