Re: I am having issues with django test

2010-03-29 Thread Phlip
>     def setUp(self): >         user = User.objects.create_user(USER, '@nowhere.com', PASS) That's what fixtures are for! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. T

Re: I am having issues with django test

2010-03-29 Thread Paulo Almeida
This doesn't answer your question, but it may help you solve the problem. I have this class in my tests: class LoggedInUser(TestCase): def setUp(self): user = User.objects.create_user(USER, 'm...@nowhere.com', PASS) self.client.login(username=user.username, password=PASS)

Re: I am having issues with django test

2010-03-27 Thread Rolando Espinoza La Fuente
On Sat, Mar 27, 2010 at 9:30 PM, Mohamed Ainab wrote: > I have this test case > >    def test_loginin_student_control_panel(self): >        c = Client() >        c.login(username="tauri", password="gaul") >        response = c.get('/student/') >        self.assertEqual(response.status_code, 200)

I am having issues with django test

2010-03-27 Thread Mohamed Ainab
I have this test case def test_loginin_student_control_panel(self): c = Client() c.login(username="tauri", password="gaul") response = c.get('/student/') self.assertEqual(response.status_code, 200) the view associated with the test case is this @login_required