astrosat / django-astrosat-core

Common backend library for Astrosat projects' core functionality
GNU General Public License v3.0
0 stars 0 forks source link

stop pinning factory-boy #67

Closed allynt closed 3 years ago

allynt commented 3 years ago

As of v3.2.0 FactoryBoy has finally fixed the issue w/ generate requiring a "locale" parameter via PR 828.

We can therefore stop pinning FactoryBoy!

Some of the existing calls to generate scattered throughout our apps' unit tests should be refactored to use the "Faker" library rather than "FactoryBoy's" wrapper of "Faker". That will happen as django-astrosat-core is propagated to those apps.

But the new version of FactoryBoy had broken how I had been using factory.Maybe. This PR addresses that by refactoring optional_declaration to make the "decider" of factory.Maybe a lazy function (which, again, uses "Faker" rather than "FactoryBoy's" wrapper).