Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force generation to use strategy defined within the factories meta #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Exelscior
Copy link

@Exelscior Exelscior commented Oct 8, 2019

  • Default in case non-set is CREATE_STRATEGY. So this conforms to the absolute hardcoded default from before.

In regards to @witold-gren 's comment in #56 :

[...] Normally in FactoryBoy we have strategy in class Meta. If I set BUILD_STRATEGY and usage fixture_factory and call to them, this fixture connect with my db. This is not intuitive..

I agree with this statement, and see no real reason for hard-coding the build strategy when we're supposed to have a default build strategy defined within the class itself.

I made this fix for my own personnel use, and thought sharing would be of interest, as it's really small and doesn't impact my projects in any way as long as I'm aware of my build strategies used (which if I specify anything other than CREATE_STRATEGY, it's usually for good reason).


This change is Reviewable

- Default in case non-set is CREATE_STRATEGY. So this conforms to the absolute hardcoded default from before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant