diff --git a/README.md b/README.md index a368d331e40f13ffd3b17cb38458dcdea219ee74..89327a8b9e1909096e5ca72ae158e77507a4a54d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -**Abstract**: This repository contains tests for API. All API tests are currently - grouped for these served by hived and these served by hivemind. The goal is to - have flat list of the tests and start their subsets separatly by hived and +**Abstract**: This repository contains tests for API. All API tests are currently + grouped for these served by hived and these served by hivemind. The goal is to + have flat list of the tests and start their subsets separately by hived and hivemind CI processes. # Usage: @@ -12,7 +12,7 @@ ``` git clone https://github.com/svanoort/pyresttest.git cd pyresttest -python3 setupt.py build +python3 setup.py build python3 setup.py install --user ``` diff --git a/benchmarks/README.md b/benchmarks/README.md index 7bfee47e11067b08f5a8ed1cd3ca6b1022ebddb5..3fae2b75a8055868c069eab008cf3938a33f476e 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -27,7 +27,7 @@ To list available csv inputs, use `-l` flag + `-n` with api name (by default `ac # output ... -2022-08-04 15:34:26,279 - performance - INFO - Found and avaiable csv's: +2022-08-04 15:34:26,279 - performance - INFO - Found and available csv's: perf_5M_light.csv cl_60M_prod_jrpc.csv diff --git a/hivemind/reference/follow_api/readme.md b/hivemind/reference/follow_api/readme.md index 4daf8f4c582cf85f918120a385163a57ff1babf9..fe1df5df07c5c58fe922a2041fbf7adc04014b9f 100644 --- a/hivemind/reference/follow_api/readme.md +++ b/hivemind/reference/follow_api/readme.md @@ -3,12 +3,12 @@ ## get_account_reputations `python3 get_account_reputations.py https://api.steem.house https://api.steemit.com ./ 1 blocktrades 1` -Expeced result: same result on both nodes +Expected result: same result on both nodes ## get_blog `python3 get_blog.py https://api.steem.house https://api.steemit.com ./ 1 blocktardes 0 1` -**Expeced result: Differences found at post_id and json_metadata** +**Expected result: Differences found at post_id and json_metadata** ## get_blog_authors @@ -17,7 +17,7 @@ Calling method follow_api.get_blog_authors returns error - {"code":-32601,"messa ## get_blog_entries `python3 get_blog_entries.py https://api.steem.house https://api.steemit.com ./ 1 blocktrades 0 1` -Expeced result: same result on both nodes +Expected result: same result on both nodes ## get_feed @@ -30,20 +30,20 @@ Calling method follow_api.get_feed_entries returns error - {"code":-32601,"messa ## get_follow_count `python3 get_follow_count.py https://api.steem.house https://api.steemit.com ./ 1 blocktrades` -**Expeced result: Differences found at follower_count** +**Expected result: Differences found at follower_count** ## get_followers `python3 get_followers.py https://api.steem.house https://api.steemit.com ./ 1 steemit '' blog 10` -Expeced result: same result on both nodes +Expected result: same result on both nodes ## get_following `python3 get_following.py https://api.steem.house https://api.steemit.com ./ 1 blocktrades '' blog 10` -Expeced result: same result on both nodes +Expected result: same result on both nodes ## get_reblogged_by `python3 get_reblogged_by.py https://api.steem.house https://api.steemit.com ./ 1 steemit firstpost` -Expeced result: same result on both nodes +Expected result: same result on both nodes diff --git a/hivemind/reference/tags_api/README.md b/hivemind/reference/tags_api/README.md index 149313d442445e5140612aceea5da47dc4d90329..974462083c571cd39e52d18469cc934ae29c6805 100644 --- a/hivemind/reference/tags_api/README.md +++ b/hivemind/reference/tags_api/README.md @@ -123,7 +123,7 @@ Method not found. ##### Returns a list of discussions by comments. `python3 get_discussions_by_comments.py https://api.steemit.com https://api.steem.house ./ steemmeupscotty black-dog-on-a-hong-kong-sunrise-animal-landscape-photography 1` -Method works fine, we have comparision error in `active_votes` `json_metadata` and `post_id`. +Method works fine, we have comparison error in `active_votes` `json_metadata` and `post_id`. Documentation isn't correct, instead `tag` argument there are `start_author` and `start_permlink`. @@ -131,7 +131,7 @@ Documentation isn't correct, instead `tag` argument there are `start_author` and ##### Returns a list of discussions by created. `python3 get_discussions_by_created.py https://api.steemit.com https://api.steem.house ./ blocktrades 1` -Method works fine, comparision error in `post_id` only. +Method works fine, comparison error in `post_id` only. ####get_discussions_by_feed #####Returns a list of discussions by feed. @@ -143,7 +143,7 @@ Method not found. ##### Returns a list of discussions by hot. `python3 get_discussions_by_hot.py https://api.steemit.com https://api.steem.house ./ blocktrades 1` -Method works fine, comparision error in `post_id` only. +Method works fine, comparison error in `post_id` only. #### get_discussions_by_promoted ##### Returns a list of discussions by promoted. @@ -192,7 +192,7 @@ Method not found. ##### Returns a list of post discussions by payout. `python3 get_post_discussions_by_payout.py https://api.steemit.com https://api.steem.house ./ blocktrades 1` -Method works fine, but there is difference in comparition: +Method works fine, but there is difference in comparison: ``` Differences detected in jsons: { diff --git a/hivemind/reference/tags_api/get_post_discussions_by_payout.py b/hivemind/reference/tags_api/get_post_discussions_by_payout.py index b9ce101276b40d3c39010df41bc2f0d31695e4ce..88e78b848661fbf4acad0c46efcfac4431c1a448 100644 --- a/hivemind/reference/tags_api/get_post_discussions_by_payout.py +++ b/hivemind/reference/tags_api/get_post_discussions_by_payout.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Currently unworking argument are commented. +# Currently non-working arguments are commented. import os import sys diff --git a/jsonsocket.py b/jsonsocket.py index df003d9e126221a86917f5189a29a3619fd64a17..91079c64ab874c98a954688ee47505fb2b6dddca 100644 --- a/jsonsocket.py +++ b/jsonsocket.py @@ -6,12 +6,12 @@ import socket class JSONSocket(object): """ Class encapsulates socket object with special handling json rpc. - timeout is ignored now - nonblicking socket not supported. + timeout is ignored now - nonblocking socket not supported. """ def __init__(self, host, port, path, timeout=None): """ host in form [http[s]://][:port] - if port not in host must be spefified as argument + if port not in host must be specified as argument """ self.__sock = None if host.find("http://") == 0 or host.find("https://") == 0: diff --git a/testbase.py b/testbase.py index 32212f2a078f606bbadf0a90f49e0b7b91ab458c..c2fdc8b544922b8d65bbd022387f71050b5f3b85 100755 --- a/testbase.py +++ b/testbase.py @@ -128,7 +128,7 @@ class SimpleJsonTest(object): if json_diff: print("Differences detected in jsons: {}".format(self.json_pretty_string(json_diff))) - # avoid dobuble write in case of error detected and differences detected. + # avoid double write in case of error detected and differences detected. if json1_error is None: self.write_to_file(filename1, json1, self._test_node) if json2_error is None: diff --git a/validate_response/__init__.py b/validate_response/__init__.py index 7191c92a6a52dbcac3c79ee74f3b82fe21d74b07..60a4d6e43bce35ce039fcdfde18c4726041c4d79 100644 --- a/validate_response/__init__.py +++ b/validate_response/__init__.py @@ -36,6 +36,7 @@ predefined_ignore_tags: dict[str, re.Pattern] = { '' : re.compile(r"root\['post_id'\]"), # tags_api.get_discussion '' : re.compile(r"root\['votes_updated_at'\]"), # witness api in haf_block_explorer '' : re.compile(r"root\[\d+\]\['id'\]"), + '': re.compile(r"root\['data'\]\['stack'\]\[\d+\]\['context'\]\['timestamp'\]"), # ignore timestamps in errors } def get_overlap(s1, s2): @@ -200,7 +201,7 @@ def has_valid_response(response, method=None, directory=None, error_response=Fal else: correct_response = result - # disable coparison with pattern on demand + # disable comparison with pattern on demand # and save if tavern_disable_comparator: test_id = response_json.get("id", None)