| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|\
| |
| | |
Don't leave AttributeBuilder in an inconsistent state on exceptions
|
| |
| |
| |
| |
| |
| | |
When one of the LazyValues raises an exception, don't leave its name
in __pending stack of the AttributeBuilder, preventing evaluation of
any other LazyValues.
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
sampaccoud/feature/add-documentation-and-test-about-factory-parent-attribute
Add documentation and test for subfactory using "factory_parent" attribute
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add documentation on how to use a LazyAttribute in a SubFactory and poke
the "factory_parent" attribute to indirectly derive the value of a field
on the child factory from a field on the parent factory. This commit adds
an example to recipes that explains how it can be done. It also adds a
test to make sure that this feature continues to work as is now described
in the documentation.
|
| | |
| | |
| | |
| | | |
Also, use check_manifest to check for MANIFEST.in / git mismatches.
|
|/ /
| |
| |
| | |
Closes #273.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Based on a boolean flag, those will alter the definitions of the current
factory, taking precedence over pre-defined behavior but overridden by
callsite-level arguments.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This handles parameters that alter the declarations of a factory.
A few technical notes:
- A parameter's outcome may alter other parameters
- In order to fix that, we perform a (simple) cyclic definition
detection at class declaration time.
- Parameters may only be either naked values or ComplexParameter
subclasses
- Parameters are never passed to the underlying class
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
That section described code required when factory_boy was automagically
computing sequence numbers from the current PK value.
Closes #280
|
| |
| |
| |
| | |
See issue #280.
|
|\ \
| | |
| | | |
Stop advertising factory_boy supports Python 2.6
|
| | |
| | |
| | |
| | | |
Support was already gone with literal sets.
|
| | |
| | |
| | |
| | | |
This trick should help with #68.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Full discussion in https://github.com/rbarrois/factory_boy/issues/271
Wanted to get something mentioned in the docs immediately.
|
|\ \ \
| | | |
| | | | |
Clarify sequence behavior on inheritance
|
| | |/
| |/|
| | | |
Sequences are only shared via inheritance if the model of the subclass is the same as or a subclass of the model of the parent class. Clarify the docs on this point.
|
| | |
| | |
| | | |
https://docs.travis-ci.com/user/migrating-from-legacy/
|
| | |
| | |
| | |
| | |
| | | |
The ``_now()`` method wasn't declared on the base class, only in its
subclasses.
|
|\ \ \
| | |/
| |/| |
factory: LazyFunction to just call a function in the simplest case
|
| | |
| | |
| | |
| | | |
No need to wrap it in a lambda to strip the object argument from LazyAttribute or the sequence argument from Sequence.
|
|\ \ \
| |/ /
|/| | |
Remove a nonexisting argument "tz" from FuzzyDateTime docs
|
|/ / |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Make safe repr more safe
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fixed spelling of word "independent".
|
| | |/
| |/| |
|
|\ \ \ |
|
| | | | |
|
| |/ /
| | |
| | |
| | | |
fixes rbarrois/factory_boy#81
|
| | |
| | |
| | |
| | | |
Thanks to @jeffwidman for suggesting this!
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When both ``from_file`` and ``filename`` are provided, ``filename``
takes precedence.
Thanks to @darkowic for spotting this :)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
fixes rbarrois/factory_boy#81
|
|/ /
| |
| |
| |
| |
| | |
As noted in #259, fully random tests have some issues, notably possibly
flaky builds: it is quite helpful to be able to choose the random seeds
used by factory_boy and friends.
|