#18575: Testing framework doesn't work without a SQL Database
-----------------------------------+------------------------------------
     Reporter:  delormemarco@…     |                    Owner:  nobody
         Type:  Bug                |                   Status:  closed
    Component:  Testing framework  |                  Version:  1.4
     Severity:  Normal             |               Resolution:  wontfix
     Keywords:  regression         |             Triage Stage:  Accepted
    Has patch:  1                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+------------------------------------
Changes (by Architekt):

 * cc: jan.bednarik@… (added)
 * status:  reopened => closed
 * resolution:   => wontfix
 * severity:  Release blocker => Normal


Comment:

 Did you notice that you can't run `python manage.py shell` without
 database?

 Patch doesn't work and it's impossible to fix this.

 When do you execute `from django.test import TestCase` in app/tests.py
 then Python executes `django.test.__init__`. There is imported one or more
 modules/classes which imports `django.db.connection` (or their dependency
 do). `django.test.client` is just first of them. If you remove it from
 `django.test.__init__`, then another module/class will import
 `django.db.connection`. And so on. Import from any module inside
 `django.db` will execute `django.db.__init__` which will raise exception
 `ImproperlyConfigured`.

 Defining default database (e.g. SQLite :memory:) will not break your code.
 So this is not not bug at all. Django just depends on database.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18575#comment:7>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to