Re: unit test: AssertionError: 302 != 200

2014-10-23 Thread kenju254
Hi Kim, I was going through Django 1.7 and noticed that you have to force the redirect on this line response = c.get('/admin/' follow=True) Regards Kenneth Kinyanjui On Saturday, 21 June 2014 05:47:24 UTC+3, Kim wrote: > > Hi everyone, > I'm new to Django and am running a test. > > For my

Re: unit test: AssertionError: 302 != 200

2014-06-21 Thread Kimitaka Nakazawa
Thanks, Marco! It solved the question. Kim On 2014年6月21日 at 17:05:45, marcowahls...@gmail.com (marcowahls...@gmail.com) wrote: Kim writes: > I'm new to Django and am running a test. > > For my admintest in tests.py, I have the following: > -- > class AdminTest(LiveServe

Re: unit test: AssertionError: 302 != 200

2014-06-21 Thread marcowahlsoft
Kim writes: > I'm new to Django and am running a test. > > For my admintest in tests.py, I have the following: > -- > class AdminTest(LiveServerTestCase): > def test_login(self): > c = Client() > > response = c.get('/admin/') > self.assertEquals(response.status_code,200) > self.asser

unit test: AssertionError: 302 != 200

2014-06-20 Thread Kim
Hi everyone, I'm new to Django and am running a test. For my admintest in tests.py, I have the following: -- class AdminTest(LiveServerTestCase): def test_login(self): c = Client() response = c.get('/admin/') self.assertEquals(response.status_code,200)