35👍
✅
So stupid of me:
Those line are wrong:
stock = factory.SubFactory(Stock)
AnotherObject = factory.SubFactory(AnotherObject)
Should have been:
stock = factory.SubFactory(StockFactory)
AnotherObject = factory.SubFactory(AnotherObjectFactory)
Hope it helps anyone else who bumps into this issue
Source:stackexchange.com