Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_list_length_success_1() -> None:
validate_field_length(['a', 'b', 'c', 'd', 'e'], 2, 5)
def test_string_length_too_large() -> None:
with pytest.raises(TooLargeException):
validate_field_length('1984-08-01', 6, 8)
def test_string_length_success_1() -> None:
validate_field_length('19840801', 6, 8)
def test_string_length_too_small() -> None:
with pytest.raises(TooSmallException):
validate_field_length('8481', 6, 8)
def test_string_length_success_2() -> None:
validate_field_length('840801', 6, 8)
def test_list_length_empty() -> None:
with pytest.raises(TooSmallException):
validate_field_length([], 1)
def test_list_length_too_small() -> None:
with pytest.raises(TooSmallException):
validate_field_length(['a'], 2, 5)
def test_string_length_success_3() -> None:
validate_field_length('a94a8fe5ccb19ba61c4c0873d391e987982fbbd3')
def test_list_length_success_2() -> None:
validate_field_length(['a', 'b'], 2, 5)
def test_list_length_success_3() -> None:
validate_field_length([])