refactor(access): ViewSet TestSuite re-written to pytest for model Company
ref: #897 #880
This commit is contained in:
@ -1,7 +1,5 @@
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from django.test import TestCase
|
|
||||||
|
|
||||||
from access.models.company_base import Company
|
from access.models.company_base import Company
|
||||||
from access.tests.unit.entity.test_unit_entity_viewset import (
|
from access.tests.unit.entity.test_unit_entity_viewset import (
|
||||||
EntityViewsetInheritedCases
|
EntityViewsetInheritedCases
|
||||||
@ -14,7 +12,14 @@ class ViewsetTestCases(
|
|||||||
EntityViewsetInheritedCases,
|
EntityViewsetInheritedCases,
|
||||||
):
|
):
|
||||||
|
|
||||||
model: str = Company
|
|
||||||
|
@property
|
||||||
|
def parameterized_class_attributes(self):
|
||||||
|
return {
|
||||||
|
'model': {
|
||||||
|
'value': Company
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -26,15 +31,13 @@ class CompanyViewsetInheritedCases(
|
|||||||
Test Cases for Entity models that inherit from model Company
|
Test Cases for Entity models that inherit from model Company
|
||||||
"""
|
"""
|
||||||
|
|
||||||
model: str = None
|
pass
|
||||||
"""name of the model to test"""
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.module_access
|
@pytest.mark.module_access
|
||||||
class CompanyViewsetTest(
|
class CompanyViewsetPyTest(
|
||||||
ViewsetTestCases,
|
ViewsetTestCases,
|
||||||
TestCase,
|
|
||||||
):
|
):
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
Reference in New Issue
Block a user