Exemplo n.º 1
0
def test_expiration_arrow(context):
    now = arrow.utcnow()

    # make sure time differences don't screw up the test
    with mock.patch.object(arrow, 'utcnow') as p:
        p.return_value = now
        expiration = get_expiration_arrow(context)
        diff = expiration.timestamp - now.timestamp
        assert diff == 3600
Exemplo n.º 2
0
def test_expiration_arrow(context):

    # make sure time differences don't screw up the test
    expiration = get_expiration_arrow(context)
    assert expiration.isoformat() == context.task['expires']
Exemplo n.º 3
0
def test_expiration_arrow(context):

    # make sure time differences don't screw up the test
    expiration = get_expiration_arrow(context)
    assert expiration.isoformat() == context.task['expires']