#17954 closed Bug (fixed)
django.test.simple.dependency_ordered() allows cyclic dependencies between aliases.
Reported by: | Łukasz Rekucki | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
(This ticket is split from #17758)
The result of this functions depends on the order of aliases for given DB signature (which in turn depends on the order in settings.DATABASES dict) - i.e. if you have a DB with aliases ["A", "B"] and "A" depends on "B" then it will raise an error. If the alias list is ["B", "A"] it will pass.
Patch with tests provided in https://github.com/django/django/pull/131
Attachments (2)
Change History (8)
comment:1 by , 13 years ago
Summary: | django.test.simple.dependency_order() allows cyclic dependencies between aliases. → django.test.simple.dependency_ordered() allows cyclic dependencies between aliases. |
---|---|
Triage Stage: | Unreviewed → Accepted |
by , 13 years ago
Attachment: | 17954.diff added |
---|
comment:4 by , 12 years ago
Resolution: | fixed |
---|---|
Status: | closed → new |
This code breaks badly if you have an alias for 'default'.
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The issue described in this ticket was fixed, so it is correctly marked fixed. If the fix created a new issue, please open a new ticket with reproduction instructions and description (and link back to this ticket if that's helpful context). Thanks!
by , 12 years ago
Attachment: | setup_databases.patch added |
---|
fix dependency problem when one db is an alias for 'default'
Patch from pull request (+ one wrapped line)