pdb works but i don't want to set pdb every time i have a problem, i want 
to know the exception/source first

this 

import 

class BaseTestCase(LiveServerTestCase):

    def setUp(self):
        setattr(settings, 'DEBUG', True) 

*doesn't work for me* :(


Il giorno sabato 9 febbraio 2013 20:38:58 UTC+1, Ron Elliott ha scritto:
>
>
>
> On Tuesday, January 29, 2013 2:39:58 AM UTC-6, Alessandro Pelliciari wrote:
>>
>> Hi, I'm writing some tests with Selenium.
>>
>> When i run my selenium tests (LiveServerTestCase type) and i have some 
>> error in my code (not in the test, i mean in the code executed, like the 
>> homepage view i reach with selenium) i get the 500 public template (that 
>> usually i get when i have DEBUG = False) even if i have:
>>
>> DEBUG = True 
>> INTERNAL_IPS = ('127.0.0.1',)
>>
>> I'm stuck with that and i can't see why my test failed (because in the 
>> public 500 ofc i don't show the exceptions).
>>
>> When i run the runserver it works perfectly (i get the tracebacks).
>>
>> I've checked the ip from request.META when i run it in a selenium test 
>> and it's the localhost, not other network IP.
>>
>> *Why does it behave like that? Where can i look to resolve?*
>>
> this work:
>
> class BaseTestCase(LiveServerTestCase):
>
>     def setUp(self):
>         setattr(settings, 'DEBUG', True) 
>
> now make all of your test cases inherit from that test case
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to