コード例 #1
0
def test_references_remain_unresolved(validator):
    rules_set_registry.extend(
        (('boolean', {'type': 'boolean'}), ('booleans', {'valuesrules': 'boolean'}))
    )
    validator.schema = {'foo': 'booleans'}
    assert 'booleans' == validator.schema['foo']
    assert 'boolean' == rules_set_registry._storage['booleans']['valuesrules']
コード例 #2
0
ファイル: test_registries.py プロジェクト: dkellner/cerberus
def test_references_remain_unresolved(validator):
    rules_set_registry.extend((('boolean', {'type': 'boolean'}),
                               ('booleans', {'valueschema': 'boolean'})))
    validator.schema = {'foo': 'booleans'}
    assert 'booleans' == validator.schema['foo']
    s = rules_set_registry._storage['booleans']['valueschema']
    assert 'boolean' == s