Re: writing unit tests for views?

2008-07-16 Thread pgb
On 15 Lip, 20:54, bshaurette <[EMAIL PROTECTED]> wrote: > For what it's worth, I finally came up with a simple working test forviews.   > Mytestswere written correctly all along, I just had to take > care of those errors related to the project settings.  It never > occurred me to just set

Re: writing unit tests for views?

2008-07-15 Thread bshaurette
For what it's worth, I finally came up with a simple working test for views. My tests were written correctly all along, I just had to take care of those errors related to the project settings. It never occurred me to just set constants at the top of the test file, but that's what worked.

Re: writing unit tests for views?

2008-07-15 Thread pgb
Hi I got the same issue. from django.test import TestCase class AccountViewTest(TestCase): def test_account_register(self): user_data_dict={ 'username':'userwerthrthh', 'email':'[EMAIL PROTECTED]',

Re: writing unit tests for views?

2008-07-14 Thread Russell Keith-Magee
On Tue, Jul 15, 2008 at 8:28 AM, bshaurette <[EMAIL PROTECTED]> wrote: > > Writing tests for models has been a snap, but I'm having a lot harder > time with the views. ... > I'm not new to writing tests, just to unit testing in Django/Python - > what would *really* help is if I could see some

writing unit tests for views?

2008-07-14 Thread bshaurette
Writing tests for models has been a snap, but I'm having a lot harder time with the views. I'm trying to use the test client, something like this: from django.test import Client, TestCase class ViewTest(TestCase): def setUp(self): self.client = Client() def