Re: Simplest unit testing of models fail ...

2008-10-20 Thread Russell Keith-Magee
On Sun, Oct 19, 2008 at 5:06 PM, zobbo <[EMAIL PROTECTED]> wrote: > > When a test fails and another test then runs, it dies because the > transaction is in error. The field with too many chars fails and that > causes the next test to raise an error. If you switch the backend to > SQLLite for

Re: Simplest unit testing of models fail ...

2008-10-19 Thread Karen Tracey
On Sun, Oct 19, 2008 at 8:38 AM, zobbo <[EMAIL PROTECTED]> wrote: > > After some conversation on irc, it appears that you can only validate > Django objects by using Django forms. > > I do find that odd but I won't get into that conversation at the > moment. > > Instead let me describe my problem

Re: Simplest unit testing of models fail ...

2008-10-19 Thread zobbo
After some conversation on irc, it appears that you can only validate Django objects by using Django forms. I do find that odd but I won't get into that conversation at the moment. Instead let me describe my problem to the world and see if anybody has any suggestions. I have a number of

Re: Simplest unit testing of models fail ...

2008-10-19 Thread zobbo
Russell Many thanks for taking the time to reply. On Oct 19, 6:13 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Sun, Oct 19, 2008 at 4:00 AM, Ian J Cottee <[EMAIL PROTECTED]> wrote: > As far as I can make out, the error you are getting is unrelated to > the problem you are

Re: Simplest unit testing of models fail ...

2008-10-18 Thread Russell Keith-Magee
On Sun, Oct 19, 2008 at 4:00 AM, Ian J Cottee <[EMAIL PROTECTED]> wrote: > > Given a backend of postgres and a simple test to test that, for > example, your model does not accept fields with more characters than > it should ... how do you do it? > > I have a part database which has two fields -

Simplest unit testing of models fail ...

2008-10-18 Thread Ian J Cottee
Given a backend of postgres and a simple test to test that, for example, your model does not accept fields with more characters than it should ... how do you do it? I have a part database which has two fields - code and description. e.g. class Part(models.Model): code =