Skip to content

Commit

Permalink
Verify with_related=True behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisfreitag committed Mar 25, 2024
1 parent 229d11e commit dab55da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_using.py
Original file line number Diff line number Diff line change
Expand Up @@ -1467,6 +1467,9 @@ class Params:
obj = TestObjectFactory.build(with_related_nested_override=True, related_obj__nested__attr=4)
self.assertEqual(1, obj.related.attr)
self.assertEqual(4, obj.related.nested.attr)
obj = TestObjectFactory.build(with_related=True)
self.assertEqual(1, obj.related.attr)
self.assertEqual(2, obj.related.nested.attr)
obj = TestObjectFactory.build(with_related_nested_override=False)
with self.assertRaises(AttributeError):
obj.related
Expand Down

0 comments on commit dab55da

Please sign in to comment.