mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Refs #33476 -- Reformatted code with Black.
This commit is contained in:
committed by
Mariusz Felisiak
parent
f68fa8b45d
commit
9c19aff7c7
@@ -4,14 +4,14 @@ from django.db import OperationalError, connection
|
||||
from django.test import TestCase
|
||||
|
||||
|
||||
@skipUnless(connection.vendor == 'sqlite', 'SQLite tests.')
|
||||
@skipUnless(connection.vendor == "sqlite", "SQLite tests.")
|
||||
class FeaturesTests(TestCase):
|
||||
def test_supports_json_field_operational_error(self):
|
||||
if hasattr(connection.features, 'supports_json_field'):
|
||||
if hasattr(connection.features, "supports_json_field"):
|
||||
del connection.features.supports_json_field
|
||||
msg = 'unable to open database file'
|
||||
msg = "unable to open database file"
|
||||
with mock.patch(
|
||||
'django.db.backends.base.base.BaseDatabaseWrapper.cursor',
|
||||
"django.db.backends.base.base.BaseDatabaseWrapper.cursor",
|
||||
side_effect=OperationalError(msg),
|
||||
):
|
||||
with self.assertRaisesMessage(OperationalError, msg):
|
||||
|
||||
Reference in New Issue
Block a user