def test_decode_iter_request_timeline(self): timestamp = time.time() latest = timestamp - 1000 data = {"has_more": True, "latest": timestamp, "messages": [{"ts": latest}]} next_ = sansio.decode_iter_request(data) assert next_ == latest
def test_decode_iter_request_paging(self): data = {"paging": {"page": 2, "pages": 4}} page = sansio.decode_iter_request(data) assert page == 3
def test_decode_iter_request_cursor(self): data = {"response_metadata": {"next_cursor": "abcdefg"}} cursor = sansio.decode_iter_request(data) assert cursor == "abcdefg"