| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under Python 2.7+, the previous versions was directly casting fuzzy
Decimal values into a float, which led to warnings in code trying to
avoid such conversions in its tested code.
Since we're just building random values, that behavior led to false
positives or required jumping through weird hoops whenever a
FuzzyDecimal was used.
We now go trough a ``str()`` call to avoid such warnings.
|
| |
|
|
|
|
|
|
|
|
|
| |
This allows the following idiom:
``user = factory.fuzzy.FuzzyChoice(User.objects.all())``
Previously, the ``User.objects.all()`` queryset would have been
evaluated *at import time*; it is now evaluated with the first use of the
``FuzzyChoice``.
|
|
|
|
|
|
|
|
|
| |
Users may now call ``factory.fuzzy.get_random_state()`` to retrieve
the current random generator's state (isolated from the one used in
Python's ``random``).
That state can then be reinjected with
``factory.fuzzy.set_random_state(state)``.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Useful for unique model attributes where the specific value can be fuzzy.
|
| |
|
|
|
|
| |
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
|
|
|