Skip to content

Commit 9e083d6

Browse files
committed
Add a test with a nested list
1 parent b60af4d commit 9e083d6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/unit/core/test_domain.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,14 @@ def test_nested__eq__(self):
174174
d2.child = ActionDomain(id=2, name="child2")
175175

176176
assert d1 != d2
177+
178+
def test_nested_list__eq__(self):
179+
child1 = ActionDomain(id=1, name="child")
180+
d1 = SomeOtherDomain(id=1, name="parent", child=[child1])
181+
d2 = SomeOtherDomain(id=1, name="parent", child=[child1])
182+
183+
assert d1 == d2
184+
185+
d2.child = [ActionDomain(id=2, name="child2")]
186+
187+
assert d1 != d2

0 commit comments

Comments
 (0)