refactor(project_management): API Fields render Functional Test Suite re-written to Pytest for model ProjectType
ref: #938 #937
This commit is contained in:
@ -0,0 +1,53 @@
|
||||
import pytest
|
||||
|
||||
from api.tests.functional.test_functional_api_fields import (
|
||||
APIFieldsInheritedCases,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@pytest.mark.model_projecttype
|
||||
class ProjectTypeAPITestCases(
|
||||
APIFieldsInheritedCases,
|
||||
):
|
||||
|
||||
|
||||
@property
|
||||
def parameterized_api_fields(self):
|
||||
|
||||
return {
|
||||
'name': {
|
||||
'expected': str
|
||||
},
|
||||
'runbook': {
|
||||
'expected': dict
|
||||
},
|
||||
'runbook.id': {
|
||||
'expected': int
|
||||
},
|
||||
'runbook.display_name': {
|
||||
'expected': str
|
||||
},
|
||||
'runbook.url': {
|
||||
'expected': str
|
||||
},
|
||||
'modified': {
|
||||
'expected': str
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class ProjectTypeAPIInheritedCases(
|
||||
ProjectTypeAPITestCases,
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@pytest.mark.module_project_management
|
||||
class ProjectTypeAPIPyTest(
|
||||
ProjectTypeAPITestCases,
|
||||
):
|
||||
|
||||
pass
|
Reference in New Issue
Block a user