[Fixed]-Django- Factory boy failing for no apparent reason in just one factory

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

Leave a comment