How to use the tomodachi.validation.validation.validate_field_length function in tomodachi

To help you get started, we’ve selected a few tomodachi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kalaspuff / tomodachi / tests / test_validation.py View on Github external
def test_list_length_success_1() -> None:
    validate_field_length(['a', 'b', 'c', 'd', 'e'], 2, 5)
github kalaspuff / tomodachi / tests / test_validation.py View on Github external
def test_string_length_too_large() -> None:
    with pytest.raises(TooLargeException):
        validate_field_length('1984-08-01', 6, 8)
github kalaspuff / tomodachi / tests / test_validation.py View on Github external
def test_string_length_success_1() -> None:
    validate_field_length('19840801', 6, 8)
github kalaspuff / tomodachi / tests / test_validation.py View on Github external
def test_string_length_too_small() -> None:
    with pytest.raises(TooSmallException):
        validate_field_length('8481', 6, 8)
github kalaspuff / tomodachi / tests / test_validation.py View on Github external
def test_string_length_success_2() -> None:
    validate_field_length('840801', 6, 8)
github kalaspuff / tomodachi / tests / test_validation.py View on Github external
def test_list_length_empty() -> None:
    with pytest.raises(TooSmallException):
        validate_field_length([], 1)
github kalaspuff / tomodachi / tests / test_validation.py View on Github external
def test_list_length_too_small() -> None:
    with pytest.raises(TooSmallException):
        validate_field_length(['a'], 2, 5)
github kalaspuff / tomodachi / tests / test_validation.py View on Github external
def test_string_length_success_3() -> None:
    validate_field_length('a94a8fe5ccb19ba61c4c0873d391e987982fbbd3')
github kalaspuff / tomodachi / tests / test_validation.py View on Github external
def test_list_length_success_2() -> None:
    validate_field_length(['a', 'b'], 2, 5)
github kalaspuff / tomodachi / tests / test_validation.py View on Github external
def test_list_length_success_3() -> None:
    validate_field_length([])