test(devops): update no_org_serializer test so it works for model SoftwareEnableFeatureFlag

ref: #855 #812
This commit is contained in:
2025-07-07 00:16:17 +09:30
parent 5b6f9bec00
commit eeaf3ab5fc

View File

@ -106,7 +106,7 @@ class ValidationAPI(
del valid_data['organization']
with pytest.raises(ValidationError) as err:
with pytest.raises(django.core.exceptions.ValidationError) as err:
serializer = ModelSerializer(
context = {
@ -119,4 +119,4 @@ class ValidationAPI(
serializer.is_valid(raise_exception = True)
serializer.save()
assert err.value.get_codes()['organization'] == 'required'
assert err.value.args[0]['organization'][0].code == 'null'