Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Data Flow
Data Loading
Wellbore DDMS Data Loader
Commits
615d1765
Commit
615d1765
authored
Mar 04, 2022
by
Gregory Harris
Browse files
Adding an extra test case
parent
7fed112a
Pipeline
#97183
passed with stages
in 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/test/test_reflection_utilities.py
View file @
615d1765
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment