Open Shodiev-Shokhrukh opened 8 months ago
@rbarrois @jeffwidman @jdufresne @francoisfreitag
@Shodiev-Shokhrukh Pinging everyone when you open an issue is not very polite, we already receive a notification.
Your test case is relying on additional code in the base classes of your code; can you try to reduce it to a more minimal situation?
We already have automated tests for that situation, which are passing, see https://github.com/FactoryBoy/factory_boy/blob/master/tests/test_using.py#L2771
Thanks,
Sorry for mentioning all of you. How to minimize this situation. I provided only little part of my model code
Description
I have a model class A which has parent field which referential for the same model . I want to create a factory for this but some error occured
To Reproduce
When writing a test class and using above factory for setup method this error occured
Model / Factory code
The issue
If i run the tests RecursionError: maximum recursion depth exceeded error occured
Notes
I did
self.base_organization = BaseOrganizationFactory(parent__parent__parent__parent=None)
orparent = factory.SubFactory( "myapp.tests.factories.BaseOrganizationFactory", parent=None )
but none of them worked the same error happened