test(assistance): Model Functional Test Suite re-written to pytest for model KnowledgeBaseCategory

ref: #904 #901
This commit is contained in:
2025-07-29 15:25:55 +09:30
parent 2ff5c345e8
commit 099c70d466
3 changed files with 54 additions and 1 deletions

View File

@ -0,0 +1,25 @@
import pytest
@pytest.fixture( scope = 'class')
def model(model_knowledgebasecategory):
yield model_knowledgebasecategory
@pytest.fixture( scope = 'class', autouse = True)
def model_kwargs(request, kwargs_knowledgebasecategory):
request.cls.kwargs_create_item = kwargs_knowledgebasecategory.copy()
yield kwargs_knowledgebasecategory.copy()
if hasattr(request.cls, 'kwargs_create_item'):
del request.cls.kwargs_create_item
@pytest.fixture( scope = 'class')
def model_serializer(serializer_knowledgebasecategory):
yield serializer_knowledgebasecategory

View File

@ -0,0 +1,28 @@
import pytest
from core.tests.functional.centurion_abstract.test_functional_centurion_abstract_model import (
CenturionAbstractModelInheritedCases
)
@pytest.mark.model_knowledgebasecategory
class knowledgeBaseCategoryModelTestCases(
CenturionAbstractModelInheritedCases
):
pass
class knowledgeBaseCategoryModelInheritedCases(
knowledgeBaseCategoryModelTestCases,
):
pass
@pytest.mark.module_assistance
class knowledgeBaseCategoryModelPyTest(
knowledgeBaseCategoryModelTestCases,
):
pass

View File

@ -77,7 +77,7 @@ class KnowledgeBaseCategoryModelInheritedCases(
@pytest.mark.module_module_assistance
@pytest.mark.module_assistance
class KnowledgeBaseCategoryModelPyTest(
KnowledgeBaseCategoryModelTestCases,
):