def test_validate_number_invalid_small(ocx): schema_props = schema_rules(ocx, "location_lat") with pytest.raises(ValidationError) as exception_info: validate_number("-200", schema_props) assert "-200 must be larger than the minimum value: -90.0" in str( exception_info)
def test_validate_number_valid(ocx): schema_props = schema_rules(ocx, "location_lat") valid_number = validate_number("50", schema_props) assert valid_number == 50
def test_validate_number_invalid_small(ocx): schema_props = schema_rules(ocx, "location_lat") with pytest.raises(ValidationError) as exception_info: validate_number("-200", schema_props) assert "-200 must be larger than the minimum value: -90.0" in str(exception_info)
def test_validate_number_valid(ocx): schema_props = schema_rules(ocx, "location_lat") valid_number = validate_number("50", schema_props) assert valid_number == 50
def test_validate_number_invalid_small(): schema_props = schema_rules('location_lat') with pytest.raises(ValidationError) as exception_info: validate_number('-200', schema_props) assert '-200 must be larger than the minimum value: -90.0' in str( exception_info)
def test_validate_number_valid(): schema_props = schema_rules('location_lat') valid_number = validate_number('50', schema_props) assert valid_number == 50