def test_invalid_session(self): session = Session("username") sleep(1) assert not session.is_valid(0)
def test_valid_session(self): session = Session("username") assert session.is_valid(60*60)