From 8dc885bd16b75a96c2db881190aaaee1a53ee8fc Mon Sep 17 00:00:00 2001 From: Francisco Javier Arceo Date: Fri, 26 Apr 2024 13:15:56 -0400 Subject: [PATCH] adding more tests and sorting the lists Signed-off-by: Francisco Javier Arceo --- .../test_on_demand_python_transformation.py | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/sdk/python/tests/unit/test_on_demand_python_transformation.py b/sdk/python/tests/unit/test_on_demand_python_transformation.py index 09bff260ae..e2db96c5f8 100644 --- a/sdk/python/tests/unit/test_on_demand_python_transformation.py +++ b/sdk/python/tests/unit/test_on_demand_python_transformation.py @@ -220,10 +220,27 @@ def test_python_docs_demo(self): ], ).to_dict() - assert list(online_python_response.keys()) == [ - "driver_id", - "acc_rate", - "conv_rate", - "conv_rate_plus_val1_python", - "conv_rate_plus_val2_python", - ] + assert sorted(list(online_python_response.keys())) == sorted( + [ + "driver_id", + "acc_rate", + "conv_rate", + "conv_rate_plus_val1_python", + "conv_rate_plus_val2_python", + ] + ) + + assert ( + online_python_response["conv_rate_plus_val1_python"][0] + == online_python_response["conv_rate_plus_val2_python"][0] + ) + assert ( + online_python_response["conv_rate"][0] + + online_python_response["acc_rate"][0] + == online_python_response["conv_rate_plus_val1_python"][0] + ) + assert ( + online_python_response["conv_rate"][0] + + online_python_response["acc_rate"][0] + == online_python_response["conv_rate_plus_val2_python"][0] + )