Closes #19377: Introduce config context profiles (#20058)
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
CI / build (20.x, 3.10) (push) Has been cancelled
CI / build (20.x, 3.11) (push) Has been cancelled
CI / build (20.x, 3.12) (push) Has been cancelled

This commit is contained in:
Jeremy Stretch
2025-08-12 18:18:45 -04:00
committed by GitHub
parent a7247f8815
commit b4c88541da
34 changed files with 812 additions and 109 deletions

View File

@@ -666,6 +666,70 @@ class JournalEntryTest(APIViewTestCases.APIViewTestCase):
]
class ConfigContextProfileTest(APIViewTestCases.APIViewTestCase):
model = ConfigContextProfile
brief_fields = ['description', 'display', 'id', 'name', 'url']
create_data = [
{
'name': 'Config Context Profile 4',
},
{
'name': 'Config Context Profile 5',
},
{
'name': 'Config Context Profile 6',
},
]
bulk_update_data = {
'description': 'New description',
}
@classmethod
def setUpTestData(cls):
profiles = (
ConfigContextProfile(
name='Config Context Profile 1',
schema={
"properties": {
"foo": {
"type": "string"
}
},
"required": [
"foo"
]
}
),
ConfigContextProfile(
name='Config Context Profile 2',
schema={
"properties": {
"bar": {
"type": "string"
}
},
"required": [
"bar"
]
}
),
ConfigContextProfile(
name='Config Context Profile 3',
schema={
"properties": {
"baz": {
"type": "string"
}
},
"required": [
"baz"
]
}
),
)
ConfigContextProfile.objects.bulk_create(profiles)
class ConfigContextTest(APIViewTestCases.APIViewTestCase):
model = ConfigContext
brief_fields = ['description', 'display', 'id', 'name', 'url']