| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This trick should help with #68.
|
| |
|
|
|
|
| |
As spotted by @stephane, thanks!
|
|
|
|
|
|
|
|
|
|
|
| |
factory.Iterator no longers begins iteration of its argument
on declaration, since this behavior may trigger database query
when that argument is, for instance, a Django queryset.
The ``factory.Iterator``'s argument will only be called when
the containing ``Factory`` is first evaluated; this means that
factories using ``factory.Iterator(models.MyThingy.objects.all())``
will no longer call the database at import time.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
The Django’s Profile example references `UserFactory` before its definition. The fix is to use the fully-qualified path to the class in question.
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
|
|
|
|
| |
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
|
|
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
|