address review comments

This commit is contained in:
fbarbu15 2023-12-11 10:28:54 +02:00
parent b355fe5eab
commit d693b7b6af
No known key found for this signature in database
GPG Key ID: D75221C8DEA22501
3 changed files with 4 additions and 4 deletions

View File

@ -44,8 +44,8 @@ class RPC(BaseClient):
set_subscriptions_response = self.rpc_call(
"post_waku_v2_filter_v1_subscription",
[
subscription["contentFilters"] if "contentFilters" in subscription else [],
subscription["pubsubTopic"] if "pubsubTopic" in subscription else None,
subscription.get("contentFilters", []),
subscription.get("pubsubTopic", None),
],
)
return set_subscriptions_response.json()["result"]

View File

@ -59,7 +59,7 @@ class StepsRelay:
except Exception as ex:
raise TimeoutError(f"WARM UP FAILED WITH: {ex}")
# this method should be used only for the tests that use the warm_up fixture
# this method should be used only for the tests that use the relay_warm_up fixture
# otherwise use wait_for_published_message_to_reach_relay_peer
@allure.step
def check_published_message_reaches_relay_peer(self, message=None, pubsub_topic=None, message_propagation_delay=0.1, sender=None, peer_list=None):

View File

@ -67,7 +67,7 @@ class TestFilterSubscribeCreate(StepsFilter):
except Exception as ex:
assert "Bad Request" in str(ex)
def test_filter_update_subscription_with_invalid_pubsub_topic_format(self, subscribe_main_nodes):
def test_filter_update_subscription_with_pubsub_topic_list_instead_of_string(self, subscribe_main_nodes):
try:
self.update_filter_subscription({"requestId": "1", "contentFilters": [self.test_content_topic], "pubsubTopic": [self.test_pubsub_topic]})
raise AssertionError(f"Subscribe with invalid pubusub topics worked!!!")