Fix some test errors in extension manager caused by database changes.

Review Request #11976 — Created Jan. 22, 2022 and submitted — Latest diff uploaded

Information

Djblets
release-3.x

Reviewers

The extension manager tests were encountering a few errors caused by
changes to Django's database layer.

First, there were some errors coming from django-evolution using the
schema editor. The sqlite backend has been changed to error out if the
schema editor is invoked in the middle of an existing atomic
transaction, and django testcases are all run from within transactions.
To get around this, I've made it so the entire extension manager test
case disabled constraint checking.

Second, the allow_thread_sharing property was made read-only, and
changing it now requires using the inc_thread_sharing() and
dec_thread_sharing() methods. These have been added where appropriate.

Ran unit tests.

Diff Revision 1

This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.

orig
1
2

Commits

First Last Summary ID Author
Fix some test errors in extension manager caused by database changes.
The extension manager tests were encountering a few errors caused by changes to Django's database layer. First, there were some errors coming from django-evolution using the schema editor. The sqlite backend has been changed to error out if the schema editor is invoked in the middle of an existing atomic transaction, and django testcases are all run from within transactions. To get around this, I've made it so the entire extension manager test case disabled constraint checking. Second, the `allow_thread_sharing` property was made read-only, and changing it now requires using the `inc_thread_sharing()` and `dec_thread_sharing()` methods. These have been added where appropriate. Testing Done: Ran unit tests.
65bc3673e1725688e35df44eaca01eec2efcb6ac David Trowbridge
djblets/extensions/tests/test_extension_manager.py
Loading...