refactor(devops): API Fields render Functional Test Suite re-written to Pytest for model SoftwareEnableFeatureFlag

ref: #946 #945 closes #730
This commit is contained in:
2025-08-07 13:42:19 +09:30
parent 703b6a67b2
commit e806a5652e

View File

@ -0,0 +1,62 @@
import pytest
from django.db import models
from rest_framework.relations import Hyperlink
from api.tests.functional.test_functional_api_fields import (
APIFieldsInheritedCases,
)
@pytest.mark.model_featureflag
class SoftwareEnableFeatureFlagAPITestCases(
APIFieldsInheritedCases,
):
@property
def parameterized_api_fields(self):
return {
'software': {
'expected': dict
},
'software.id': {
'expected': int
},
'software.display_name': {
'expected': str
},
'software.url': {
'expected': Hyperlink
},
'name': {
'expected': str
},
'description': {
'expected': str
},
'enabled': {
'expected': bool
},
'modified': {
'expected': str
}
}
class SoftwareEnableFeatureFlagAPIInheritedCases(
SoftwareEnableFeatureFlagAPITestCases,
):
pass
@pytest.mark.module_devops
class SoftwareEnableFeatureFlagAPIPyTest(
SoftwareEnableFeatureFlagAPITestCases,
):
pass