mirror of
https://github.com/logos-co/nomos-e2e-tests.git
synced 2025-02-23 19:58:25 +00:00
test: use json response
This commit is contained in:
parent
c5f82e6176
commit
01b6025afb
@ -28,4 +28,5 @@ class REST(BaseClient):
|
||||
return self.rest_call("post", "disperse-data", json.dumps(data))
|
||||
|
||||
def send_get_range(self, query):
|
||||
return self.rest_call("post", "da/get-range", json.dumps(query))
|
||||
response = self.rest_call("post", "da/get-range", json.dumps(query))
|
||||
return response.json()
|
||||
|
@ -28,15 +28,13 @@ class StepsDataAvailability(StepsCommon):
|
||||
|
||||
@allure.step
|
||||
def get_data_range(self, app_id, start, end):
|
||||
response_bytes = []
|
||||
response = []
|
||||
query = prepare_get_range_request(app_id, start, end)
|
||||
try:
|
||||
response_bytes = self.node2.send_get_data_range_request(query)
|
||||
response = self.node2.send_get_data_range_request(query)
|
||||
except Exception as ex:
|
||||
assert "Bad Request" in str(ex) or "Internal Server Error" in str(ex)
|
||||
|
||||
# Extract data as a string for each index in the received order
|
||||
parsed_data = []
|
||||
for item in response_bytes.content:
|
||||
parsed_data.append(item)
|
||||
parsed_data = json.loads(response)
|
||||
return parsed_data
|
||||
|
Loading…
x
Reference in New Issue
Block a user