Re: Beginner's unit test question

2011-09-05 Thread Rodney Topor
Never mind. I've found the answer. The problem was that my app name "messages" somehow clashed with the app "django.contrib.messages" which was earlier in my INSTALLED_APPS. This didn't prevent my project from working, but did confuse the test framework, which looked in "django.contrib.messages"

Re: Beginner's unit test question

2011-09-05 Thread Rodney Topor
I'm sorry for my inconsistency. I tried to "simplify", but made a mistake. In fact, I used the app "messages" throughout, in my code and in the test command. The project containing the app works fine. In particular, the app "messages" is included in INSTALLED_APPS. So, if the test "should work"

Re: Beginner's unit test question

2011-09-05 Thread bruno desthuilliers
On Sep 5, 5:18 am, Rodney Topor wrote: > I'm trying to use unit tests for the first time. > > In app/tests.py I have: > > import unittest > from django.test.client import Client > > class IndexTest(unittest.TestCase): >     def test_index(self): >         client = Client() >         response = cli

Beginner's unit test question

2011-09-04 Thread Rodney Topor
I'm trying to use unit tests for the first time. In app/tests.py I have: import unittest from django.test.client import Client class IndexTest(unittest.TestCase): def test_index(self): client = Client() response = client.get('/index/') self.assertEqual(response.status