On Saturday 29 March 2014 19:11:17 Harry Percival wrote:
> 
> What I *am* saying is that, in my opinion, there's not much point in
> LiveServerTestCase if it doesn't do static files.  So, to keep things
> simple, it would be simpler to remove it, and just have on LiveServer test
> class, that lives in .contrib if it has to...
> 
> But maybe others would disagree?
> 
> To explain a bit more -- what is LiveServerTestCase for?  It's to let you
> run tests with (eg) selenium, against a "real" web server.  And one of the
> most obvious reasons to do that is to test client-side stuff like
> javascript, ie stuff that depends on static files.  And so that means that
> you have to either run collectstatic before every test run, or switch to
> StaticLiveServerCase.
> 

FWIW, I've been using LiveServerTestCase to test an app that, in some 
circumstances, needs to send requests to other servers; in essence, mocking 
those other servers. It's been very useful for this, and it does not require 
any statics.

Granted, that is a fringe case, and the main use-case remains tests involving 
real browsers. Just pointing out that a LiveServerTestCase with no support for 
statics does have real uses.

Shai.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/4449879.WcngD07VJA%40deblack.
For more options, visit https://groups.google.com/d/optout.

Reply via email to