wagtail / wagtail-factories

Factory boy classes for wagtail
http://wagtail-factories.readthedocs.io/en/latest/
MIT License
102 stars 40 forks source link

Not compatable with Factory Boy 3.0 #28

Closed hammygoonan closed 3 years ago

hammygoonan commented 4 years ago

Factory Boy 3.0 was released earlier today with a breaking change to imports.

I'm now getting this error: AttributeError: module 'factory' has no attribute 'DjangoModelFactory

here's the full stack trace:

/blocks/tests/media_block_tests.py:8: in <module>
    import wagtail_factories
/usr/local/lib/python3.8/site-packages/wagtail_factories/__init__.py:1: in <module>
    from .blocks import *
/usr/local/lib/python3.8/site-packages/wagtail_factories/blocks.py:8: in <module>
    from wagtail_factories.factories import ImageFactory
/usr/local/lib/python3.8/site-packages/wagtail_factories/factories.py:42: in <module>
    class MP_NodeFactory(factory.DjangoModelFactory):
E   AttributeError: module 'factory' has no attribute 'DjangoModelFactory'
hammygoonan commented 4 years ago

Just submitted a PR to fix this

marteinn commented 3 years ago

PR is merged so I'm closing this. Thanks for the excellent work @hammygoonan!

hammygoonan commented 3 years ago

Happy to help @marteinn !