I have a situation where I need to run an external python script in a
test after the tables are loaded from fixtures. This doesn't work
because django runs the tests in a transaction and the external python
script is running in its own MySQL connection from the test so it's in
its own transaction. When the external python script does something
that requires a foreign key look up in a table that was loaded from a
fixture it finds that table locked because the transaction in the test
has not been committed.

I tried changing the tx_isolation from REPEATABLE-READ (what it was
originally) to READ-COMMITTED and then READ-UNCOMMITTED with no change
in the behavior. Also tried adding a commit() to the beginning of the
test (i.e. after the fixtures are loaded), but that did not help
either. Is there some way to either get the transaction committed
after the fixture load or have the tests not run in a transaction?

This is on django 1.6, MySQL 5.5, InnoDB tables.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACwCsY74mV3uTKY%2BDRx9OY2bfjLrU19TahpMb%3DeQ2cT3AsWsYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to