Ejemplo n.º 1
0
def test_hgt_in_in_must_be_between_59_and_76():
    assert is_valid_hgt({"hgt": "58in"}) is False
    assert is_valid_hgt({"hgt": "60in"}) is True
    assert is_valid_hgt({"hgt": "77in"}) is False
Ejemplo n.º 2
0
def test_hgt_in_cm_must_be_between_150_and_193():
    assert is_valid_hgt({"hgt": "149cm"}) is False
    assert is_valid_hgt({"hgt": "180cm"}) is True
    assert is_valid_hgt({"hgt": "194cm"}) is False
Ejemplo n.º 3
0
def test_hgt_must_have_height_and_units():
    assert is_valid_hgt({"hgt": "180"}) is False
    assert is_valid_hgt({"hgt": "cm"}) is False
    assert is_valid_hgt({"hgt": "180cm"}) is True
Ejemplo n.º 4
0
def test_hgt_must_be_in_cm_or_in():
    assert is_valid_hgt({"hgt": "6ft"}) is False
    assert is_valid_hgt({"hgt": "180cm"}) is True
    assert is_valid_hgt({"hgt": "60in"}) is True
Ejemplo n.º 5
0
def test_hgt_is_required():
    assert is_valid_hgt({}) is False
    assert is_valid_hgt({"hgt": "180cm"}) is True