Skip to content

Commit

Permalink
adding more tests and sorting the lists
Browse files Browse the repository at this point in the history
Signed-off-by: Francisco Javier Arceo <[email protected]>
  • Loading branch information
franciscojavierarceo committed Apr 26, 2024
1 parent 809455b commit 8dc885b
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions sdk/python/tests/unit/test_on_demand_python_transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
)

0 comments on commit 8dc885b

Please sign in to comment.