post_syncdb is triggered twice, in unittest, even with dispatch_uid
|Reported by:||Xinkai||Owned by:||nobody|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Here is how to reproduce the bug.
- Start a fresh project, set DB backend.
- Start a new app called myapp. Add myapp to INSTALLED_APPS.
- Create /myapp/management/__init__.py
from django.db.models.signals import post_syncdb import myapp.models def my_callback(sender, **kwargs): print "Called!!!" post_syncdb.connect(my_callback, sender=myapp.models, dispatch_uid = "unique_string")
- run './manage.py test myapp', or './manage.py test', 'Called!!!' will appear twice.
Change History (4)
comment:1 Changed 2 years ago by radiac
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:2 Changed 22 months ago by jezdez
- Resolution set to wontfix
- Status changed from new to closed
comment:3 Changed 22 months ago by jezdez
- Triage Stage changed from Unreviewed to Design decision needed
Note: See TracTickets for help on using tickets.