Esempio n. 1
0
def test_before_int():
    now_local = int(time.time())
    assert before(now_local - 1) is False
    assert before(now_local + 2)
Esempio n. 2
0
def test_before_0():
    assert before("")
    assert before(0)
Esempio n. 3
0
def test_before():
    current_year = datetime.today().year
    assert before("%d-01-01T00:00:00Z" % current_year) is False
    assert before("%d-01-01T00:00:00Z" % (current_year + 1)) is True
Esempio n. 4
0
def test_before_int():
    now_local = int(time.time())
    assert before(now_local - 1) is False
    assert before(now_local + 2)
Esempio n. 5
0
def test_before_0():
    assert before("")
    assert before(0)
Esempio n. 6
0
def test_before():
    current_year = datetime.today().year
    assert before("%d-01-01T00:00:00Z" % current_year) is False
    assert before("%d-01-01T00:00:00Z" % (current_year + 1)) is True