You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-Up to #385, which was fixed in #486. When specifying values for a M2M field inside an object that is itself accessed via a foreign key, baker doesn't create m2m entries when called with _bulk_create=True.
Inside the test suite, with the additional model definition (so we can have a model with a foreign key field to a model with a m2m field -- none of the existing models currently fulfills this condition)
______ TestCreateM2MWhenBulkCreate.test_create_through_foreign_key_field ______
tests/test_baker.py:1101: in test_create_through_foreign_key_field
assert list(h1.home.dogs.all()) == list(h2.home.dogs.all()) == [dog]
E assert [] == [<Dog: Dog object (1)>]
E
E Right contains one more item: <Dog: Dog object (1)>
E
E Full diff:
E + []
E - [
E - <Dog: Dog object (1)>,
E - ]
Follow-Up to #385, which was fixed in #486. When specifying values for a M2M field inside an object that is itself accessed via a foreign key, baker doesn't create m2m entries when called with
_bulk_create=True
.Inside the test suite, with the additional model definition (so we can have a model with a foreign key field to a model with a m2m field -- none of the existing models currently fulfills this condition)
put this test in
class TestCreateM2MWhenBulkCreate
:It fails with the error:
Versions
The text was updated successfully, but these errors were encountered: