mirror of
https://github.com/logos-blockchain/logos-blockchain-e2e-tests.git
synced 2026-01-02 21:23:07 +00:00
21 lines
602 B
Python
21 lines
602 B
Python
import allure
|
|
|
|
from src.steps.common import StepsCommon
|
|
|
|
|
|
def prepare_dispersal_data(data):
|
|
data_bytes = data.encode("utf-8")
|
|
dispersal_data = {"data": list(data_bytes), "metadata": {"app_id": [1] + [0] * 31, "index": [0] * 8}}
|
|
return dispersal_data
|
|
|
|
|
|
class StepsDataAvailability(StepsCommon):
|
|
|
|
@allure.step
|
|
def disperse_data(self, data):
|
|
dispersal_data = prepare_dispersal_data(data)
|
|
try:
|
|
self.node3.send_dispersal_request(dispersal_data)
|
|
except Exception as ex:
|
|
assert "Bad Request" in str(ex) or "Internal Server Error" in str(ex)
|