Add a TestCase utility function for overriding siteconfig settings.
Review Request #9941 — Created May 15, 2018 and submitted
TestCase.siteconfig_settings, a context manager that
overrides the site configuration settings for a test or part of a test.
The base implementation will store new settings in siteconfig and then
revert them after the context manager is finished. It does not apply any
settings to Django by default, though, leaving this up to a more
This is largely pulled from a utility method in Review Board.
Made use of this in upcoming changes. Verified the new siteconfig settings
and that they were reverted after the change.
I have a very similar implementation in reviewboard.testing.testcases (override_siteconfig). Can you add a cleanup task for me to deprecate that? ...