I have a django app that uses a temp table. In the real world this is no issue, as each invocation of the app runs in its own MySQL session so there cannot be any conflict with the temp tables.
But in my tests there are multiple requests sent, and apparently they are all in the same session, as on the second request I get an error because the temp table already exists. I have tried everything I can think of: I create a new Client instance for each request in a function so the reference goes out of scope, I delete the reference, I log out between requests, but no matter what, I still get the error.
What I can do so that each request in a test has its own MySQL session?
Aucun commentaire:
Enregistrer un commentaire