Re: testing newbie - help requested: app works, tests give errors

2023-05-10 Thread 'Bob Aalsma' via Django users
Hmm, when I remove the raise CommandError statement and replace it with self.stdout.write, everything works well. This helps me to point further studies. Thx! On Wednesday, May 10, 2023 at 2:33:18 PM UTC+2 Bob Aalsma wrote: > Ah, yes, thanks. > > I hesitate to comment on "If I understood the

Re: testing newbie - help requested: app works, tests give errors

2023-05-10 Thread 'Bob Aalsma' via Django users
Ah, yes, thanks. I hesitate to comment on "If I understood the error right." ;) Umm, my problem here is that I think I'm using the exact same *code* "manually" without errors. I think I'm also using the same *values* for the manual and test runs. So I don't understand the reason for the

Re: testing newbie - help requested: app works, tests give errors

2023-05-10 Thread Vishesh Mangla
If I understood the error right. On Wed, May 10, 2023 at 5:47 PM Vishesh Mangla wrote: > Probably this would help: > https://stackoverflow.com/questions/8609192/what-is-the-difference-between-null-true-and-blank-true-in-django > > On Wed, May 10, 2023 at 5:45 PM 'Bob Aalsma' via Django users <

Re: testing newbie - help requested: app works, tests give errors

2023-05-10 Thread Vishesh Mangla
Probably this would help: https://stackoverflow.com/questions/8609192/what-is-the-difference-between-null-true-and-blank-true-in-django On Wed, May 10, 2023 at 5:45 PM 'Bob Aalsma' via Django users < django-users@googlegroups.com> wrote: > Sorry Vishesh, thanks for the quick answer but I have no

Re: testing newbie - help requested: app works, tests give errors

2023-05-10 Thread 'Bob Aalsma' via Django users
Sorry Vishesh, thanks for the quick answer but I have no idea what you mean. On Wednesday, May 10, 2023 at 2:00:51 PM UTC+2 Vishesh Mangla wrote: > False or True check for yourself. > > On Wed, 10 May, 2023, 17:29 Vishesh Mangla, wrote: > >> It looks like you are passing a null but null=False

Re: testing newbie - help requested: app works, tests give errors

2023-05-10 Thread Vishesh Mangla
False or True check for yourself. On Wed, 10 May, 2023, 17:29 Vishesh Mangla, wrote: > It looks like you are passing a null but null=False is not set > > On Wed, 10 May, 2023, 17:27 'Bob Aalsma' via Django users, < > django-users@googlegroups.com> wrote: > >> I'm trying to test a django-admin

Re: testing newbie - help requested: app works, tests give errors

2023-05-10 Thread Vishesh Mangla
It looks like you are passing a null but null=False is not set On Wed, 10 May, 2023, 17:27 'Bob Aalsma' via Django users, < django-users@googlegroups.com> wrote: > I'm trying to test a django-admin command and don't understand why the > tests give errors on the code while the code works as

testing newbie - help requested: app works, tests give errors

2023-05-10 Thread 'Bob Aalsma' via Django users
I'm trying to test a django-admin command and don't understand why the tests give errors on the code while the code works as expected. I'm under the impression that the *raise CommandError* is ignored by the test, but don't understand why this would be. Please help. Running the code shows: