ok, what about this scenario. some of my pages require a login prior to seeing the content and i can't see to get this to work using the django client. any suggestions? this is what my test looks like so far.
import unittest from django.test.client import Client class Test(unittest.TestCase): def setUp(self): self.client = Client() def testStart(self): response = self.client.get('/app/layout') self.failUnlessEqual(response.status_code, 301) #attempting to log in here. response = self.client.get('/_ah/login?continue=http%3A//localhost %3A8081/app/layout') self.failUnlessEqual(response.status_code, 302) # another attempt at logging in. #response = self.client.get('/_ah/login?email=Aliquam.nec %40Vestibulumante.edu&action=Login&continue=http%3A%2F%2Flocalhost %3A8081%2Fapp%2Flayout') response = self.client.login(path='/app/layout', username='Aliquam.nec%40Vestibulumante.edu', password='') self.failUnlessEqual(response, True) response = self.client.get('/app/layout') self.failUnlessEqual(response.status_code, 200) On Jun 26, 12:15 pm, Michelschr <michels...@gmail.com> wrote: > I had GaeUnit working on Rietveld (à la Guido...), the test: > > import unittest > from django.test.client import Client > > class Test(unittest.TestCase): > > def testDjango(self): > c = Client() > response = c.get('/code') > self.failUnlessEqual(response.status_code, 200) > self.failIf(not ('SERVER' in response.content)) > > passed, not possible (for me) to 'from django.test import TestCase' > only from unittest. > > But it is not out of the box! You should search a lot by yourself... > > I will continue to investigate... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---