-
Notifications
You must be signed in to change notification settings - Fork 401
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch away from ParameteredDeclaration
Now that BaseDeclaration handles arbitrary kwargs as a set of default parameters for the declaration (and exposes them through its `unroll_context` default), the ParameteredDeclaration is no longer required.
- Loading branch information
Showing
4 changed files
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
824c6e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, good day:
I was use generate method to get value random in my tests. Do you have any tip for generate random values with Faker class in the new release?.
Thank you!!!.
Jonathan Maita.
824c6e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems
generate
was renamed toevaluate
and requires two additional parameters, e.g.824c6e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the tip!
824c6e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jonamaita @tlrh314 Note that both
.generate()
and.evaluate()
are private methods.The supported way to use faker in a factory is simply:
824c6e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rbarrois Thank you.! Now I will use the
Faker
class to generate false values where it is not necessary to use the model, e,g:824c6e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have also found the same issue with generate, the changelog also doesn't mention this change.
FYI a private method should be _generate, _evaluate or else it is assumed public.