diff --git a/tests/store/test_hashes.py b/tests/store/test_hashes.py index 83cc9378..0ac37f85 100644 --- a/tests/store/test_hashes.py +++ b/tests/store/test_hashes.py @@ -54,7 +54,7 @@ class TestHashes(StepsStore): except Exception as ex: assert "waku message hash parsing error: invalid hash length" in str(ex) - def test_store_with_non_base64_hash(self): + def test_store_with_non_hex_hash(self): for i in range(4): self.publish_message(message=self.create_message(payload=to_base64(f"Message_{i}"))) non_hex_hash = "test" @@ -63,7 +63,7 @@ class TestHashes(StepsStore): store_response = self.get_messages_from_store(node, hashes=non_hex_hash, page_size=50) assert not store_response.messages except Exception as ex: - assert "waku message hash parsing error: invalid hash length" in str(ex) + assert "Exception converting hex string to bytes: t is not a hexadecimal character" in str(ex) # Addon on Test @@ -106,14 +106,14 @@ class TestHashes(StepsStore): except Exception as ex: assert "waku message hash parsing error" in str(ex), "Unexpected error for combined empty and valid hash" - # Test for hashes that include non-Base64 characters. + # Test for hashes that include non-hex characters. def test_store_with_non_base64_characters_in_hash(self): - non_base64_hash = "###INVALID###" # Invalid hash with non-Base64 characters + non_hex_hash = "###INVALID HEX###" # Invalid hash with non-hex characters for i in range(4): self.publish_message(message=self.create_message(payload=to_base64(f"Message_{i}"))) for node in self.store_nodes: - store_response = self.get_store_messages_with_errors(node, hashes=non_base64_hash, page_size=50) + store_response = self.get_store_messages_with_errors(node, hashes=non_hex_hash, page_size=50) assert ( "waku message hash parsing error: Incorrect base64 string" in store_response["error_message"]