Common: Extract MutableInfectionMonkeyModelConfig

This commit is contained in:
Mike Salvatore 2022-10-04 12:29:56 -04:00 committed by vakarisz
parent eb3daf84f1
commit d8cf5d33dd
1 changed files with 7 additions and 3 deletions

View File

@ -10,6 +10,11 @@ class InfectionMonkeyModelConfig:
extra = Extra.forbid
class MutableInfectionMonkeyModelConfig(InfectionMonkeyModelConfig):
allow_mutation = True
validate_assignment = True
class InfectionMonkeyBaseModel(BaseModel):
class Config(InfectionMonkeyModelConfig):
pass
@ -47,6 +52,5 @@ class InfectionMonkeyBaseModel(BaseModel):
class MutableInfectionMonkeyBaseModel(InfectionMonkeyBaseModel):
class Config(InfectionMonkeyModelConfig):
allow_mutation = True
validate_assignment = True
class Config(MutableInfectionMonkeyModelConfig):
pass