I am attempting to add some custom faker provider to use with factory_boy
and pytest
.
I put the provider in
faker_providers/foo.py/Provider
.
In my factories.py
file, I have to import foo.py
and then register by running:
factory.Faker.add_provider(foo.Provider)
I am thinking of using pytest_sessionstart(session)
to auto-register all the custom provider under faker_providers
. Is there a way to do that?
Any suggestions for other ways to organize and register custom providers would also be appreciated.