Open 14droplets opened 8 years ago
Thanks for the reproducible example.
@rbarrois is more familiar with the traits functionality... I actually haven't had the time to play with it yet. So hopefully he can take a quick peek at some point.
Just ran into this issue as described in the original post with a similar SelfAttribute
+ SubFactory
+ Trait
setup.
My setup:
Python 3.4.3
Django==1.10.3
factory-boy==2.8.1
If a trait parameter passed to
SubFactory
not as strictTrue
orFalse
value, but asSelfAttrubute
- it always evaluates as ifTrue
were passed.This issue can be reproduced easilly with this example
(full gist at https://gist.github.com/Snork2/d88977f5bf66157f721c69363c2449f6)
This example prints
while
were expected
Environment:
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:38:48) [MSC v.1900 32 bit (Intel)] on win32
SQLAlchemy==1.0.12
factory-boy==2.7.0