Re: Cusom SQL in test

2008-05-15 Thread Vitaliy
On May 15, 12:08 pm, Alex Morega <[EMAIL PROTECTED]> wrote: > IPBlock.objects.all().count() Yea, I know it's just a typo... The table is realy empty, I checked it by all() and I looked directly into db. --~--~-~--~~~---~--~~ You received this message because you a

Re: Cusom SQL in test

2008-05-15 Thread Alex Morega
On May 15, 2008, at 11:56 , Vitaliy wrote: > but when i run tests '$python manage.py test' - IPBlock's table is > empty (self.assertTrue(IPBlock.objects.all().count > 0) - failed) "count" is a method - you need to write smth like IPBlock.objects.all().count() You can also skip the .all() part

Cusom SQL in test

2008-05-15 Thread Vitaliy
Hi I created model called 'IPBlock' I created file 'sql/IPBlock.slq' with some sql inserts when I run '$python manage.py syncdb' - it works fine IPBlock's table filled with data but when i run tests '$python manage.py test' - IPBlock's table is empty (self.assertTrue(IPBlock.objects.all().count >