OK. solved.
The problem was that I did something like this:
class MyModel(models.Model):
field = #this field is marked as unique
and then in tests:
sid = transaction.savepoint()
ml1 = MyModel(field = 'a')
ml1.save()
m2 = MyModel(field = 'b')
self.assertRaises(IntegrityError, m2.save)
Thanks for response,
savepoint api looks nice and in fact it did the thing for some tests.
But for some other I still got the same error - looks strange since
tests are trying to do simmilar logic.
I thought that problem was in some logic in test setUp, but again in
both test cases there is setU
On Fri, 2009-03-20 at 16:26 -0700, LD wrote:
> Hi,
>
> Today I enforced strange situation, hope it is strange only for me nad
> you will quickly tell me what stupidness I am doing.
>
> Well, today I have switched from sqlite to postgre. Everything was
> perfect since I've tried to run set of uni
Hi,
Today I enforced strange situation, hope it is strange only for me nad
you will quickly tell me what stupidness I am doing.
Well, today I have switched from sqlite to postgre. Everything was
perfect since I've tried to run set of unit tests for my project.
Every time my tests deals with sit
4 matches
Mail list logo