[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.189.192.193: ~ $
# -*- coding: utf-8 -*-

from cerberus.tests import assert_fail, assert_success


def test_clear_cache(validator):
    assert len(validator._valid_schemas) > 0
    validator.clear_caches()
    assert len(validator._valid_schemas) == 0


def test_docstring(validator):
    assert validator.__doc__


# Test that tesing with the sample schema works as expected
# as there might be rules with side-effects in it

def _test_that_test_fails(test, *args):
    try:
        test(*args)
    except AssertionError:
        pass
    else:
        raise AssertionError("test didn't fail")


def test_fail():
    _test_that_test_fails(assert_fail, {'an_integer': 60})


def test_success():
    _test_that_test_fails(assert_success, {'an_integer': 110})

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
__init__.py File 4.45 KB 0644
conftest.py File 2.78 KB 0644
test_assorted.py File 741 B 0644
test_customization.py File 1.76 KB 0644
test_errors.py File 8.8 KB 0644
test_legacy.py File 30 B 0644
test_normalization.py File 13.05 KB 0644
test_registries.py File 2.42 KB 0644
test_schema.py File 3.18 KB 0644
test_validation.py File 49.8 KB 0644