コード例 #1
0
def test_before_0():
    assert before("")
    assert before(0)
コード例 #2
0
def test_before_int():
    now_local = int(time.time())
    assert before(now_local - 1) is False
    assert before(now_local + 2)
コード例 #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