Beispiel #1
0
def test_invalid_date():
    with raises(InvalidDate):
        validate_date('abc')
    with raises(InvalidDate):
        validate_date('19941301')
Beispiel #2
0
def test_valid_date():
    # Dates are YYYYMMDD
    assert validate_date('19940101') == '19940101'
def test_invalid_date():
    with raises(InvalidDate):
        validate_date('abc')
    with raises(InvalidDate):
        validate_date('19941301')
def test_valid_date():
    # Dates are YYYYMMDD
    assert validate_date('19940101') == '19940101'
def test_invalid_date():
    with raises(InvalidDate):
        validate_date("abc")
    with raises(InvalidDate):
        validate_date("19941301")
def test_valid_date():
    # Dates are YYYYMMDD
    assert validate_date("19940101") == "19940101"