-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c33fbb
commit 8a6c1e9
Showing
2 changed files
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ def test_single_object(): | |
}""" | ||
data = json.loads(test_data) | ||
entities = build_entities_from_data(data) | ||
assert len(entities.entities) == 1 | ||
assert len(list(entities.entities)) == 1 | ||
for _ in entities.entities: | ||
assert len(_.values) == 2 | ||
assert _.values == [["sai"], ["[email protected]"]] | ||
|
@@ -29,7 +29,7 @@ def test_single_object(): | |
|
||
|
||
def test_single_object_one_level(): | ||
"""test write to single object""" | ||
"""test write to single object with one level""" | ||
test_data = """ | ||
{ | ||
"name": "sai", | ||
|
@@ -41,7 +41,7 @@ def test_single_object_one_level(): | |
}""" | ||
data = json.loads(test_data) | ||
entities = build_entities_from_data(data) | ||
assert len(entities.entities) == 1 | ||
assert len(list(entities.entities)) == 1 | ||
for _ in entities.entities: | ||
assert len(_.values) == 3 | ||
assert _.values[0:2] == [["sai"], ["[email protected]"]] | ||
|
@@ -68,8 +68,9 @@ def test_single_object_one_level(): | |
] | ||
) | ||
|
||
|
||
def test_single_object_one_level_array(): | ||
"""test write to single object""" | ||
"""test write to single object with array in first level""" | ||
test_data = """ | ||
{ | ||
"name": "sai", | ||
|
@@ -85,7 +86,7 @@ def test_single_object_one_level_array(): | |
}""" | ||
data = json.loads(test_data) | ||
entities = build_entities_from_data(data) | ||
assert len(entities.entities) == 1 | ||
assert len(list(entities.entities)) == 1 | ||
for _ in entities.entities: | ||
assert len(_.values) == 3 | ||
assert _.values[0:2] == [["sai"], ["[email protected]"]] | ||
|
@@ -111,4 +112,3 @@ def test_single_object_one_level_array(): | |
EntityPath("country", False, is_attribute=True) | ||
] | ||
) | ||
|