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"