Exemplo n.º 1
0
def test_optional_text_property(id_name, optional):
    result = text_property({"id": id_name, "optional": optional})
    assert result == {
        id_name: {
            "type": "string",
            "minLength": 0 if optional else 1
        }
    }
Exemplo n.º 2
0
def test_text_property_format(id_name):
    result = text_property({"id": id_name, "limits": {"format": "email"}})
    assert result == {
        id_name: {
            "type": "string",
            "format": "email",
            "minLength": 1
        }
    }
def test_text_property_format(id_name):
    result = text_property({"id": id_name, "limits": {"format": "email"}})
    assert result == {id_name: {"type": "string", "format": "email", "minLength": 1}}
def test_optional_text_property(id_name, optional):
    result = text_property({"id": id_name, "optional": optional})
    assert result == {id_name: {"type": "string", "minLength": 0 if optional else 1}}
Exemplo n.º 5
0
def test_text_property(id_name):
    result = text_property({"id": id_name})
    assert result == {id_name: {"type": "string", "minLength": 1}}