From 3ed7471c1586164762b2d69109b466888cf249df Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 28 Jul 2025 11:19:27 +0930 Subject: [PATCH] refactor(access): ViewSet TestSuite re-written to pytest for model Company ref: #897 #880 --- .../unit/company/test_unit_company_viewset.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/app/access/tests/unit/company/test_unit_company_viewset.py b/app/access/tests/unit/company/test_unit_company_viewset.py index 1f83bb39..ad573912 100644 --- a/app/access/tests/unit/company/test_unit_company_viewset.py +++ b/app/access/tests/unit/company/test_unit_company_viewset.py @@ -1,7 +1,5 @@ import pytest -from django.test import TestCase - from access.models.company_base import Company from access.tests.unit.entity.test_unit_entity_viewset import ( EntityViewsetInheritedCases @@ -14,7 +12,14 @@ class ViewsetTestCases( 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 """ - model: str = None - """name of the model to test""" + pass @pytest.mark.module_access -class CompanyViewsetTest( +class CompanyViewsetPyTest( ViewsetTestCases, - TestCase, ): pass