Ejemplo n.º 1
0
def test_validation_fails_on_missing_required_key(required_dict):
    for key in required_dict.keys():
        test_dict = required_dict.copy()
        test_dict.pop(key)
        element = examinee.SlackConfig(name='foo', raw_dict=test_dict)
        with pytest.raises(ModelValidationError):
            element.validate()
Ejemplo n.º 2
0
def test_validation_succeeds_on_unknown_key(required_dict):
    test_dict = {**required_dict, **{'foo': 'bar'}}
    element = examinee.SlackConfig(name='foo', raw_dict=test_dict)
    element.validate()
Ejemplo n.º 3
0
def test_validation_succeeds_on_required_dict(required_dict):
    element = examinee.SlackConfig(name='foo', raw_dict=required_dict)
    element.validate()