예제 #1
0
def test_before_int():
    now_local = int(time.time())
    assert before(now_local - 1) is False
    assert before(now_local + 2)
예제 #2
0
def test_before_0():
    assert before("")
    assert before(0)
예제 #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
예제 #4
0
def test_before_int():
    now_local = int(time.time())
    assert before(now_local - 1) is False
    assert before(now_local + 2)
예제 #5
0
def test_before_0():
    assert before("")
    assert before(0)
예제 #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