#29513: Improve testing multi_db documentation
-------------------------------------+-------------------------------------
     Reporter:  Adam (Chainz)        |                    Owner:  nobody
  Johnson                            |
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Testing framework    |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

 #28478 is related.

 It suggests merging `multi_db` and `allow_database_queries` flags into a
 single `databases` aliases set that would be unionized to determine which
 databases needs to be created based on the tests retrieved during
 discovery.

 When a query to an unspecified database would be performed an error
 similar to the one raised when performing queries in a `SimpleTestCase`
 right now would be raised. `SimpleTestCase.databases` would be an empty
 set while `TestCase.databases = {DEFAULT_DB_ALIAS}`. `multi_db = True`
 could be alias for `databases = {alias for alias in connections}` during
 the deprecation period. We could also support a special `databases =
 '__all__'`  value to replicate the actual `multi_db` behavior.

 Here's the
 [https://github.com/django/django/compare/master...charettes:ticket-28478
 PoC].

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29513#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.5be93553cac8f60ad326c49beccc6cbe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to