flask-restplus-server-example icon indicating copy to clipboard operation
flask-restplus-server-example copied to clipboard

Tests failing with pg but ok with sqlite

Open askz opened this issue 6 years ago • 4 comments

Hi, I'm ok with tests since maybe 8 months and I just merged your upstream repo with mine, now I have tests failing with postgres only (which I use in my CI) but with sqlite, no errors. Any ideas ?

https://gist.github.com/askz/33f2d0d8bb6f1d953c7c1ef6f16b4fef

askz avatar Nov 07 '17 16:11 askz

I have no idea what caused the change of client_id from regular_user_client to OAUTH2_regular_user in the first two failing tests.

As to the last two, I expected that, PostgreSQL uses auto incrementing which never gets reset (even if you delete all the records from a table), which is why /1 and /2 IDs return 404, since there were other tests before this one, which took those IDs earlier and already dropped the records. We should implement a more robust tests instead implicitly hoping that those IDs will match in runtime.

frol avatar Nov 07 '17 16:11 frol

Okay, I'll try to fix that by referecing instances directly.

askz avatar Nov 07 '17 17:11 askz

@askz Have you had a chance to fix that?

frol avatar Dec 19 '17 20:12 frol

Not at all, sorry... In fact I leaved the project where I was using your base.

askz avatar Dec 20 '17 09:12 askz