Skip to content

Commit

Permalink
tweaks in the tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mariacarmina committed Sep 26, 2023
1 parent 49c9a62 commit 3dde2c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def send_create_update_tx(name, ddo, flags, account):
if flags[0] & 2:
headers = {"Content-type": "application/octet-stream"}
response = requests.post(
provider_url + "/api/services/encrypt?chainId={web3.chain_id}",
provider_url + f"/api/services/encrypt?chainId={web3.eth.chain_id}",
data=compressed_document,
headers=headers,
timeout=5,
Expand Down
6 changes: 4 additions & 2 deletions tests/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ def run_test(client, base_ddo_url, events_instance, flags):
for service in published_ddo["services"]:
assert service["datatokenAddress"] == erc20_address
assert service["name"] in ["dataAssetAccess", "dataAssetComputingService"]
ddo_state = get_did_state(events_instance._es_instance, None, None, None, did)
ddo_state = get_did_state(
events_instance._es_instance, web3.eth.chain_id, None, None, did
)
assert len(ddo_state["hits"]["hits"]) == 1
assert ddo_state["hits"]["hits"][0]["_id"] == did
assert ddo_state["hits"]["hits"][0]["_source"]["valid"] is True
Expand Down Expand Up @@ -122,7 +124,7 @@ def test_publish_unallowed_address(client, base_ddo_url, events_object):


def test_publish_and_update_ddo_rbac(client, base_ddo_url, events_object, monkeypatch):
monkeypatch.setenv("RBAC_SERVER_URL", "http://localhost:3000")
monkeypatch.setenv("RBAC_SERVER_URL", "http://172.15.0.8:3000")
run_test(client, base_ddo_url, events_object, 2)


Expand Down

0 comments on commit 3dde2c8

Please sign in to comment.