Пример #1
0
 def test_validation_fails_on_missing_required_key(self, deployment_required_dict):
     for key in deployment_required_dict.keys():
         test_dict = deployment_required_dict.copy()
         test_dict.pop(key)
         element = examinee.WebhookDispatcherDeploymentConfig(name='foo', raw_dict=test_dict)
         with pytest.raises(ModelValidationError):
             element.validate()
 def test_validation_succeeds_on_unknown_key(self,
                                             deployment_required_dict):
     test_dict = {**deployment_required_dict, **{'foo': 'bar'}}
     element = examinee.WebhookDispatcherDeploymentConfig(
         name='foo', raw_dict=test_dict)
     element.validate()
 def test_validation_succeeds_on_required_dict(self,
                                               deployment_required_dict):
     element = examinee.WebhookDispatcherDeploymentConfig(
         name='foo', raw_dict=deployment_required_dict)
     element.validate()