Hello. Perhaps you need to use LiveServerTestCase, but it appears only in 
Django 1.4. 
https://docs.djangoproject.com/en/dev/topics/testing/?from=olddocs#django.test.LiveServerTestCase

четверг, 26 февраля 2009 г., 17:54:25 UTC+4 пользователь x_O написал:
>
> Hi 
>
> Recently I'm trying to write tests for almost every thing in my code. 
> Including HTTP and XMLRPC requests. 
>
> from django.test import TestCase 
>
> class XmlRpcCase(TestCase): 
>     def setUp(self): 
>         self.xmlrpc = xmlrpclib.ServerProxy("http://127.0.0.1:8000/ 
> store/xmlrpc <http://127.0.0.1:8000/store/xmlrpc>") 
>
>     def testCreate(self): 
>         case = dict(name='case_name') 
>          self.xmlrpc.Case.create(case) 
>         self.assertEquals(Case.objects.count(), 1) 
>
> Right now test will use a DATABASE_NAME to create a case object by 
> XMLRPC request, and after that will use in assertion 
> TEST_DATABASE_NAME. So the result will be always failed. 
>
> Any ideas for some smart solution for this kind of cases. 
>
> x_O 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/MIDIf3XIzlAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to