Ejemplo n.º 1
0
def test_is_time():
    assert time.is_time(datetime.utcnow()) is True
    assert time.is_time('2017-02-14 08:08:12.999') is True
    assert time.is_time(Time.now()) is True

    assert time.is_time(None) is False
    assert time.is_time('2016-14-14 19:08') is False
Ejemplo n.º 2
0
def test_is_time():
    assert time.is_time(datetime.utcnow()) is True
    assert time.is_time('2017-02-14 08:08:12.999') is True
    assert time.is_time(Time.now()) is True

    assert time.is_time(None) is False
    assert time.is_time('2016-14-14 19:08') is False
Ejemplo n.º 3
0
def test_is_time():
    assert time.is_time(datetime.utcnow()) is True
    assert time.is_time('2017-02-14 08:08:12.999',
                        "%Y-%m-%d %H:%M:%S.%f") is True

    assert time.is_time(None) is False
    assert time.is_time('2016-14-14 19:08', "%Y-%b-%d %H:%M:%S") is False
Ejemplo n.º 4
0
def test_is_time():
    assert time.is_time(datetime.utcnow()) is True
    assert time.is_time('2017-02-14 08:08:12.999', "%Y-%m-%d %H:%M:%S.%f") is True

    assert time.is_time(None) is False
    assert time.is_time('2016-14-14 19:08', "%Y-%b-%d %H:%M:%S") is False