Commit 615d1765 authored by Gregory Harris's avatar Gregory Harris
Browse files

Adding an extra test case

parent 7fed112a
Pipeline #97183 passed with stages
in 49 seconds
......@@ -141,3 +141,21 @@ class TestReflectionHelper:
ReflectionHelper.setattr_recursive([1, 2, 3], data, ["xyz", "123"])
assert data == expected
def test_GIVEN_populated_destination_dict_and_array_to_add_WHEN_setattr_recursive_THEN_populates_destination_dict_with_overwrite(self):
expected = {
"abc": "a string",
"xyz": {
"abc": [1, 2, 3]
}
}
data = {
"abc": "a string",
"xyz": {
"abc": "a string"
}
}
ReflectionHelper.setattr_recursive([1, 2, 3], data, ["xyz", "abc"])
assert data == expected
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment