From e2cab224ae2b3addf84d8ebfde2ff87bd9202076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Sun, 5 Nov 2023 14:55:53 +0900 Subject: [PATCH] add test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- test/python/test_serialize.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/python/test_serialize.py b/test/python/test_serialize.py index 4968856..a0e631c 100644 --- a/test/python/test_serialize.py +++ b/test/python/test_serialize.py @@ -256,5 +256,29 @@ if __name__ == "__main__": error_dump(e) error_count += 1 + try: + logger.info(f"Try: Self TweetDetail Test") + kwargs = get_kwargs("TweetDetail", {"focalTweetId": "1720975693524377759"}) + res = pt.TweetApi(api_client).get_tweet_detail_with_http_info(**kwargs) + data = res.data.to_dict() + + rate = match_rate(data, json.loads(res.raw_data)) + logger.info(f"Match rate: {rate}") + except Exception as e: + error_dump(e) + error_count += 1 + + try: + logger.info(f"Try: Self TweetDetail Test") + kwargs = get_kwargs("TweetDetail", {"focalTweetId": "1720818185186791678"}) + res = pt.TweetApi(api_client).get_tweet_detail_with_http_info(**kwargs) + data = res.data.to_dict() + + rate = match_rate(data, json.loads(res.raw_data)) + logger.info(f"Match rate: {rate}") + except Exception as e: + error_dump(e) + error_count += 1 + if error_count > 0: exit(1)