#2879: Add live test server support to test framework
-------------------------------------+-------------------------------------
     Reporter:  Mikeal Rogers        |                    Owner:  devin
  <mikeal@…>                         |                   Status:  new
         Type:  New feature          |                  Version:
    Component:  Testing framework    |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  1
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by julien):

 I've spent some time trying to make it work for in-memory sqlite databases
 but unfortunately it looks like this may not be achievable. So, as
 suggested by Almad, I've made it to skip the tests in that case.

 Also, you'll note that `LiveServerTestCase` now inherits from
 `TransactionTestCase` instead of `TestCase`. The problem with `TestCase`
 is that changes are not committed and therefore the live server's database
 connection can't have access to them since it uses a different cursor.

 Finally, I've made the live server serve media files by introducing a new
 `MediaFilesHandler` class based on `StaticFilesHandler`. Maybe there's a
 better approach so, as always, any feedback is welcome! :)

 PS: Tom, I've had some issues applying your previous patch. In particular
 some new files seemed to be missing. Are you creating the diff from the
 working directory? If so, I usually achieve this by staging all the files
 I want to diff and then by running: `git diff --staged > mypatch.diff`.
 Although it feels there has to be a better way!

-- 
Ticket URL: <https://code.djangoproject.com/ticket/2879#comment:82>
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 this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to