1
0
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:
django-bot
2022-02-03 20:24:19 +01:00
committed by Mariusz Felisiak
parent f68fa8b45d
commit 9c19aff7c7
1992 changed files with 139577 additions and 96284 deletions

View File

@@ -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):