def test_token_with_past_expiry_is_not_valid(self): token = Token(userid='acct:[email protected]') token.expires = _seconds_from_now(-1800) assert not token.is_valid()
def test_token_with_no_expiry_is_valid(self): token = Token(userid='acct:[email protected]') assert token.is_valid()