Fixed isolation of FeaturesTests.test_supports_json_field_operational_error().
This commit is contained in:
parent
fbacaa58ff
commit
ed6db53542
|
@ -10,8 +10,9 @@ class FeaturesTests(TestCase):
|
|||
if hasattr(connection.features, "supports_json_field"):
|
||||
del connection.features.supports_json_field
|
||||
msg = "unable to open database file"
|
||||
with mock.patch(
|
||||
"django.db.backends.base.base.BaseDatabaseWrapper.cursor",
|
||||
with mock.patch.object(
|
||||
connection,
|
||||
"cursor",
|
||||
side_effect=OperationalError(msg),
|
||||
):
|
||||
with self.assertRaisesMessage(OperationalError, msg):
|
||||
|
|
Loading…
Reference in New Issue