',
row_ender='',
help_text_html=' %s',
- errors_on_separate_row=False)
+ errors_on_separate_row=False,
+ )
def as_ul(self):
"Return this form rendered as HTML
s -- excluding the
."
@@ -290,7 +291,8 @@ class BaseForm:
error_row='
%s
',
row_ender='',
help_text_html=' %s',
- errors_on_separate_row=False)
+ errors_on_separate_row=False,
+ )
def as_p(self):
"Return this form rendered as HTML
s."
@@ -299,7 +301,8 @@ class BaseForm:
error_row='%s',
row_ender='
',
help_text_html=' %s',
- errors_on_separate_row=True)
+ errors_on_separate_row=True,
+ )
def non_field_errors(self):
"""
diff --git a/django/middleware/common.py b/django/middleware/common.py
index 2a74774654..bea3f7448a 100644
--- a/django/middleware/common.py
+++ b/django/middleware/common.py
@@ -130,7 +130,8 @@ class BrokenLinkEmailsMiddleware(MiddlewareMixin):
),
"Referrer: %s\nRequested URL: %s\nUser agent: %s\n"
"IP address: %s\n" % (referer, path, ua, ip),
- fail_silently=True)
+ fail_silently=True,
+ )
return response
def is_internal_request(self, domain, referer):
diff --git a/django/test/runner.py b/django/test/runner.py
index 9ed78a6be8..9bd9f2b506 100644
--- a/django/test/runner.py
+++ b/django/test/runner.py
@@ -356,7 +356,8 @@ class ParallelTestSuite(unittest.TestSuite):
pool = multiprocessing.Pool(
processes=self.processes,
initializer=self.init_worker.__func__,
- initargs=[counter])
+ initargs=[counter],
+ )
args = [
(self.runner_class, index, subsuite, self.failfast)
for index, subsuite in enumerate(self.subsuites)
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py
index af11c2ac35..a0cff0837b 100644
--- a/django/utils/translation/trans_real.py
+++ b/django/utils/translation/trans_real.py
@@ -146,7 +146,8 @@ class DjangoTranslation(gettext_module.GNUTranslations):
localedir=localedir,
languages=[self.__locale],
codeset='utf-8',
- fallback=use_null_fallback)
+ fallback=use_null_fallback,
+ )
def _init_translation_catalog(self):
"""Create a base catalog using global django translations."""
diff --git a/tests/admin_views/admin.py b/tests/admin_views/admin.py
index ceae4c11a2..9e6ce63077 100644
--- a/tests/admin_views/admin.py
+++ b/tests/admin_views/admin.py
@@ -282,8 +282,7 @@ download.short_description = 'Download subscription'
def no_perm(modeladmin, request, selected):
- return HttpResponse(content='No permission to perform this action',
- status=403)
+ return HttpResponse(content='No permission to perform this action', status=403)
no_perm.short_description = 'No permission to run'
@@ -685,11 +684,7 @@ class ReportAdmin(admin.ModelAdmin):
def get_urls(self):
# Corner case: Don't call parent implementation
- return [
- url(r'^extra/$',
- self.extra,
- name='cable_extra'),
- ]
+ return [url(r'^extra/$', self.extra, name='cable_extra')]
class CustomTemplateBooleanFieldListFilter(BooleanFieldListFilter):
diff --git a/tests/annotations/tests.py b/tests/annotations/tests.py
index ee1c50cfdf..d7759c8552 100644
--- a/tests/annotations/tests.py
+++ b/tests/annotations/tests.py
@@ -283,9 +283,10 @@ class NonAggregateAnnotationTestCase(TestCase):
def test_annotation_reverse_m2m(self):
books = Book.objects.annotate(
- store_name=F('store__name')).filter(
- name='Practical Django Projects').order_by(
- 'store_name')
+ store_name=F('store__name'),
+ ).filter(
+ name='Practical Django Projects',
+ ).order_by('store_name')
self.assertQuerysetEqual(
books, [
@@ -497,7 +498,8 @@ class NonAggregateAnnotationTestCase(TestCase):
F('ticker_name'),
F('description'),
Value('No Tag'),
- function='COALESCE')
+ function='COALESCE',
+ )
).annotate(
tagline_lower=Lower(F('tagline'), output_field=CharField())
).order_by('name')
diff --git a/tests/auth_tests/test_auth_backends.py b/tests/auth_tests/test_auth_backends.py
index 390d26ea9b..1a1950e989 100644
--- a/tests/auth_tests/test_auth_backends.py
+++ b/tests/auth_tests/test_auth_backends.py
@@ -559,8 +559,8 @@ class ChangedBackendSettingsTest(TestCase):
# Get a session for the test user
self.assertTrue(self.client.login(
username=self.TEST_USERNAME,
- password=self.TEST_PASSWORD)
- )
+ password=self.TEST_PASSWORD,
+ ))
# Prepare a request object
request = HttpRequest()
request.session = self.client.session
diff --git a/tests/check_framework/test_security.py b/tests/check_framework/test_security.py
index cfc90f95e9..e6fe1f6cb7 100644
--- a/tests/check_framework/test_security.py
+++ b/tests/check_framework/test_security.py
@@ -13,7 +13,8 @@ class CheckSessionCookieSecureTest(SimpleTestCase):
@override_settings(
SESSION_COOKIE_SECURE=False,
INSTALLED_APPS=["django.contrib.sessions"],
- MIDDLEWARE=[])
+ MIDDLEWARE=[],
+ )
def test_session_cookie_secure_with_installed_app(self):
"""
Warn if SESSION_COOKIE_SECURE is off and "django.contrib.sessions" is
@@ -24,7 +25,8 @@ class CheckSessionCookieSecureTest(SimpleTestCase):
@override_settings(
SESSION_COOKIE_SECURE=False,
INSTALLED_APPS=[],
- MIDDLEWARE=["django.contrib.sessions.middleware.SessionMiddleware"])
+ MIDDLEWARE=['django.contrib.sessions.middleware.SessionMiddleware'],
+ )
def test_session_cookie_secure_with_middleware(self):
"""
Warn if SESSION_COOKIE_SECURE is off and
@@ -36,7 +38,8 @@ class CheckSessionCookieSecureTest(SimpleTestCase):
@override_settings(
SESSION_COOKIE_SECURE=False,
INSTALLED_APPS=["django.contrib.sessions"],
- MIDDLEWARE=["django.contrib.sessions.middleware.SessionMiddleware"])
+ MIDDLEWARE=['django.contrib.sessions.middleware.SessionMiddleware'],
+ )
def test_session_cookie_secure_both(self):
"""
If SESSION_COOKIE_SECURE is off and we find both the session app and
@@ -47,7 +50,8 @@ class CheckSessionCookieSecureTest(SimpleTestCase):
@override_settings(
SESSION_COOKIE_SECURE=True,
INSTALLED_APPS=["django.contrib.sessions"],
- MIDDLEWARE=["django.contrib.sessions.middleware.SessionMiddleware"])
+ MIDDLEWARE=['django.contrib.sessions.middleware.SessionMiddleware'],
+ )
def test_session_cookie_secure_true(self):
"""
If SESSION_COOKIE_SECURE is on, there's no warning about it.
@@ -64,7 +68,8 @@ class CheckSessionCookieHttpOnlyTest(SimpleTestCase):
@override_settings(
SESSION_COOKIE_HTTPONLY=False,
INSTALLED_APPS=["django.contrib.sessions"],
- MIDDLEWARE=[])
+ MIDDLEWARE=[],
+ )
def test_session_cookie_httponly_with_installed_app(self):
"""
Warn if SESSION_COOKIE_HTTPONLY is off and "django.contrib.sessions"
@@ -75,7 +80,8 @@ class CheckSessionCookieHttpOnlyTest(SimpleTestCase):
@override_settings(
SESSION_COOKIE_HTTPONLY=False,
INSTALLED_APPS=[],
- MIDDLEWARE=["django.contrib.sessions.middleware.SessionMiddleware"])
+ MIDDLEWARE=['django.contrib.sessions.middleware.SessionMiddleware'],
+ )
def test_session_cookie_httponly_with_middleware(self):
"""
Warn if SESSION_COOKIE_HTTPONLY is off and
@@ -87,7 +93,8 @@ class CheckSessionCookieHttpOnlyTest(SimpleTestCase):
@override_settings(
SESSION_COOKIE_HTTPONLY=False,
INSTALLED_APPS=["django.contrib.sessions"],
- MIDDLEWARE=["django.contrib.sessions.middleware.SessionMiddleware"])
+ MIDDLEWARE=['django.contrib.sessions.middleware.SessionMiddleware'],
+ )
def test_session_cookie_httponly_both(self):
"""
If SESSION_COOKIE_HTTPONLY is off and we find both the session app and
@@ -98,7 +105,8 @@ class CheckSessionCookieHttpOnlyTest(SimpleTestCase):
@override_settings(
SESSION_COOKIE_HTTPONLY=True,
INSTALLED_APPS=["django.contrib.sessions"],
- MIDDLEWARE=["django.contrib.sessions.middleware.SessionMiddleware"])
+ MIDDLEWARE=['django.contrib.sessions.middleware.SessionMiddleware'],
+ )
def test_session_cookie_httponly_true(self):
"""
If SESSION_COOKIE_HTTPONLY is on, there's no warning about it.
@@ -119,8 +127,7 @@ class CheckCSRFMiddlewareTest(SimpleTestCase):
"""
self.assertEqual(self.func(None), [csrf.W003])
- @override_settings(
- MIDDLEWARE=["django.middleware.csrf.CsrfViewMiddleware"])
+ @override_settings(MIDDLEWARE=['django.middleware.csrf.CsrfViewMiddleware'])
def test_with_csrf_middleware(self):
self.assertEqual(self.func(None), [])
@@ -133,7 +140,8 @@ class CheckCSRFCookieSecureTest(SimpleTestCase):
@override_settings(
MIDDLEWARE=["django.middleware.csrf.CsrfViewMiddleware"],
- CSRF_COOKIE_SECURE=False)
+ CSRF_COOKIE_SECURE=False,
+ )
def test_with_csrf_cookie_secure_false(self):
"""
Warn if CsrfViewMiddleware is in MIDDLEWARE but
@@ -144,7 +152,8 @@ class CheckCSRFCookieSecureTest(SimpleTestCase):
@override_settings(
MIDDLEWARE=["django.middleware.csrf.CsrfViewMiddleware"],
CSRF_USE_SESSIONS=True,
- CSRF_COOKIE_SECURE=False)
+ CSRF_COOKIE_SECURE=False,
+ )
def test_use_sessions_with_csrf_cookie_secure_false(self):
"""
No warning if CSRF_COOKIE_SECURE isn't True while CSRF_USE_SESSIONS
@@ -162,7 +171,8 @@ class CheckCSRFCookieSecureTest(SimpleTestCase):
@override_settings(
MIDDLEWARE=["django.middleware.csrf.CsrfViewMiddleware"],
- CSRF_COOKIE_SECURE=True)
+ CSRF_COOKIE_SECURE=True,
+ )
def test_with_csrf_cookie_secure_true(self):
self.assertEqual(self.func(None), [])
@@ -180,8 +190,7 @@ class CheckSecurityMiddlewareTest(SimpleTestCase):
"""
self.assertEqual(self.func(None), [base.W001])
- @override_settings(
- MIDDLEWARE=["django.middleware.security.SecurityMiddleware"])
+ @override_settings(MIDDLEWARE=['django.middleware.security.SecurityMiddleware'])
def test_with_security_middleware(self):
self.assertEqual(self.func(None), [])
@@ -194,16 +203,15 @@ class CheckStrictTransportSecurityTest(SimpleTestCase):
@override_settings(
MIDDLEWARE=["django.middleware.security.SecurityMiddleware"],
- SECURE_HSTS_SECONDS=0)
+ SECURE_HSTS_SECONDS=0,
+ )
def test_no_sts(self):
"""
Warn if SECURE_HSTS_SECONDS isn't > 0.
"""
self.assertEqual(self.func(None), [base.W004])
- @override_settings(
- MIDDLEWARE=[],
- SECURE_HSTS_SECONDS=0)
+ @override_settings(MIDDLEWARE=[], SECURE_HSTS_SECONDS=0)
def test_no_sts_no_middleware(self):
"""
Don't warn if SECURE_HSTS_SECONDS isn't > 0 and SecurityMiddleware isn't
@@ -213,7 +221,8 @@ class CheckStrictTransportSecurityTest(SimpleTestCase):
@override_settings(
MIDDLEWARE=["django.middleware.security.SecurityMiddleware"],
- SECURE_HSTS_SECONDS=3600)
+ SECURE_HSTS_SECONDS=3600,
+ )
def test_with_sts(self):
self.assertEqual(self.func(None), [])
@@ -227,7 +236,8 @@ class CheckStrictTransportSecuritySubdomainsTest(SimpleTestCase):
@override_settings(
MIDDLEWARE=["django.middleware.security.SecurityMiddleware"],
SECURE_HSTS_INCLUDE_SUBDOMAINS=False,
- SECURE_HSTS_SECONDS=3600)
+ SECURE_HSTS_SECONDS=3600,
+ )
def test_no_sts_subdomains(self):
"""
Warn if SECURE_HSTS_INCLUDE_SUBDOMAINS isn't True.
@@ -237,7 +247,8 @@ class CheckStrictTransportSecuritySubdomainsTest(SimpleTestCase):
@override_settings(
MIDDLEWARE=[],
SECURE_HSTS_INCLUDE_SUBDOMAINS=False,
- SECURE_HSTS_SECONDS=3600)
+ SECURE_HSTS_SECONDS=3600,
+ )
def test_no_sts_subdomains_no_middleware(self):
"""
Don't warn if SecurityMiddleware isn't installed.
@@ -247,7 +258,8 @@ class CheckStrictTransportSecuritySubdomainsTest(SimpleTestCase):
@override_settings(
MIDDLEWARE=["django.middleware.security.SecurityMiddleware"],
SECURE_SSL_REDIRECT=False,
- SECURE_HSTS_SECONDS=None)
+ SECURE_HSTS_SECONDS=None,
+ )
def test_no_sts_subdomains_no_seconds(self):
"""
Don't warn if SECURE_HSTS_SECONDS isn't set.
@@ -257,7 +269,8 @@ class CheckStrictTransportSecuritySubdomainsTest(SimpleTestCase):
@override_settings(
MIDDLEWARE=["django.middleware.security.SecurityMiddleware"],
SECURE_HSTS_INCLUDE_SUBDOMAINS=True,
- SECURE_HSTS_SECONDS=3600)
+ SECURE_HSTS_SECONDS=3600,
+ )
def test_with_sts_subdomains(self):
self.assertEqual(self.func(None), [])
@@ -365,16 +378,15 @@ class CheckContentTypeNosniffTest(SimpleTestCase):
@override_settings(
MIDDLEWARE=["django.middleware.security.SecurityMiddleware"],
- SECURE_CONTENT_TYPE_NOSNIFF=False)
+ SECURE_CONTENT_TYPE_NOSNIFF=False,
+ )
def test_no_content_type_nosniff(self):
"""
Warn if SECURE_CONTENT_TYPE_NOSNIFF isn't True.
"""
self.assertEqual(self.func(None), [base.W006])
- @override_settings(
- MIDDLEWARE=[],
- SECURE_CONTENT_TYPE_NOSNIFF=False)
+ @override_settings(MIDDLEWARE=[], SECURE_CONTENT_TYPE_NOSNIFF=False)
def test_no_content_type_nosniff_no_middleware(self):
"""
Don't warn if SECURE_CONTENT_TYPE_NOSNIFF isn't True and
@@ -384,7 +396,8 @@ class CheckContentTypeNosniffTest(SimpleTestCase):
@override_settings(
MIDDLEWARE=["django.middleware.security.SecurityMiddleware"],
- SECURE_CONTENT_TYPE_NOSNIFF=True)
+ SECURE_CONTENT_TYPE_NOSNIFF=True,
+ )
def test_with_content_type_nosniff(self):
self.assertEqual(self.func(None), [])
@@ -397,16 +410,15 @@ class CheckXssFilterTest(SimpleTestCase):
@override_settings(
MIDDLEWARE=["django.middleware.security.SecurityMiddleware"],
- SECURE_BROWSER_XSS_FILTER=False)
+ SECURE_BROWSER_XSS_FILTER=False,
+ )
def test_no_xss_filter(self):
"""
Warn if SECURE_BROWSER_XSS_FILTER isn't True.
"""
self.assertEqual(self.func(None), [base.W007])
- @override_settings(
- MIDDLEWARE=[],
- SECURE_BROWSER_XSS_FILTER=False)
+ @override_settings(MIDDLEWARE=[], SECURE_BROWSER_XSS_FILTER=False)
def test_no_xss_filter_no_middleware(self):
"""
Don't warn if SECURE_BROWSER_XSS_FILTER isn't True and
@@ -416,7 +428,8 @@ class CheckXssFilterTest(SimpleTestCase):
@override_settings(
MIDDLEWARE=["django.middleware.security.SecurityMiddleware"],
- SECURE_BROWSER_XSS_FILTER=True)
+ SECURE_BROWSER_XSS_FILTER=True,
+ )
def test_with_xss_filter(self):
self.assertEqual(self.func(None), [])
@@ -429,16 +442,15 @@ class CheckSSLRedirectTest(SimpleTestCase):
@override_settings(
MIDDLEWARE=["django.middleware.security.SecurityMiddleware"],
- SECURE_SSL_REDIRECT=False)
+ SECURE_SSL_REDIRECT=False,
+ )
def test_no_ssl_redirect(self):
"""
Warn if SECURE_SSL_REDIRECT isn't True.
"""
self.assertEqual(self.func(None), [base.W008])
- @override_settings(
- MIDDLEWARE=[],
- SECURE_SSL_REDIRECT=False)
+ @override_settings(MIDDLEWARE=[], SECURE_SSL_REDIRECT=False)
def test_no_ssl_redirect_no_middleware(self):
"""
Don't warn if SECURE_SSL_REDIRECT is False and SecurityMiddleware isn't
@@ -448,7 +460,8 @@ class CheckSSLRedirectTest(SimpleTestCase):
@override_settings(
MIDDLEWARE=["django.middleware.security.SecurityMiddleware"],
- SECURE_SSL_REDIRECT=True)
+ SECURE_SSL_REDIRECT=True,
+ )
def test_with_ssl_redirect(self):
self.assertEqual(self.func(None), [])
diff --git a/tests/defer/tests.py b/tests/defer/tests.py
index a3ef1c58b1..dbb1299255 100644
--- a/tests/defer/tests.py
+++ b/tests/defer/tests.py
@@ -233,8 +233,7 @@ class TestDefer2(AssertionMixin, TestCase):
fetched parent model PK if it happens to be available.
"""
s1 = Secondary.objects.create(first="x1", second="y1")
- bc = BigChild.objects.create(name="b1", value="foo", related=s1,
- other="bar")
+ bc = BigChild.objects.create(name='b1', value='foo', related=s1, other='bar')
bc_deferred = BigChild.objects.only('name').get(pk=bc.pk)
with self.assertNumQueries(0):
bc_deferred.id
diff --git a/tests/delete_regress/tests.py b/tests/delete_regress/tests.py
index a8b1cb0386..d4d39843e3 100644
--- a/tests/delete_regress/tests.py
+++ b/tests/delete_regress/tests.py
@@ -61,8 +61,7 @@ class DeleteCascadeTests(TestCase):
"""
person = Person.objects.create(name='Nelson Mandela')
award = Award.objects.create(name='Nobel', content_object=person)
- AwardNote.objects.create(note='a peace prize',
- award=award)
+ AwardNote.objects.create(note='a peace prize', award=award)
self.assertEqual(AwardNote.objects.count(), 1)
person.delete()
self.assertEqual(Award.objects.count(), 0)
@@ -78,10 +77,8 @@ class DeleteCascadeTests(TestCase):
"""
juan = Child.objects.create(name='Juan')
paints = Toy.objects.create(name='Paints')
- played = PlayedWith.objects.create(child=juan, toy=paints,
- date=datetime.date.today())
- PlayedWithNote.objects.create(played=played,
- note='the next Jackson Pollock')
+ played = PlayedWith.objects.create(child=juan, toy=paints, date=datetime.date.today())
+ PlayedWithNote.objects.create(played=played, note='the next Jackson Pollock')
self.assertEqual(PlayedWithNote.objects.count(), 1)
paints.delete()
self.assertEqual(PlayedWith.objects.count(), 0)
diff --git a/tests/expressions/models.py b/tests/expressions/models.py
index 34fd9dff16..42e4a37bb0 100644
--- a/tests/expressions/models.py
+++ b/tests/expressions/models.py
@@ -22,12 +22,14 @@ class Company(models.Model):
ceo = models.ForeignKey(
Employee,
models.CASCADE,
- related_name='company_ceo_set')
+ related_name='company_ceo_set',
+ )
point_of_contact = models.ForeignKey(
Employee,
models.SET_NULL,
related_name='company_point_of_contact_set',
- null=True)
+ null=True,
+ )
def __str__(self):
return self.name
diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py
index 7453838839..b57a16c35f 100644
--- a/tests/expressions/tests.py
+++ b/tests/expressions/tests.py
@@ -373,7 +373,8 @@ class BasicExpressionsTests(TestCase):
# other lookups could not reuse.
qs = Employee.objects.filter(
company_ceo_set__num_chairs=F('company_ceo_set__num_employees'),
- company_ceo_set__num_chairs__gte=1)
+ company_ceo_set__num_chairs__gte=1,
+ )
self.assertEqual(str(qs.query).count('JOIN'), 1)
def test_ticket_18375_kwarg_ordering_2(self):
@@ -793,17 +794,20 @@ class ExpressionsTests(TestCase):
self.assertQuerysetEqual(
Employee.objects.filter(firstname__contains=F('lastname')),
["", "", ""],
- ordered=False)
+ ordered=False,
+ )
self.assertQuerysetEqual(
Employee.objects.filter(firstname__startswith=F('lastname')),
["", ""],
- ordered=False)
+ ordered=False,
+ )
self.assertQuerysetEqual(
Employee.objects.filter(firstname__endswith=F('lastname')),
[""],
- ordered=False)
+ ordered=False,
+ )
def test_insensitive_patterns_escape(self):
r"""
@@ -825,17 +829,20 @@ class ExpressionsTests(TestCase):
self.assertQuerysetEqual(
Employee.objects.filter(firstname__icontains=F('lastname')),
["", "", ""],
- ordered=False)
+ ordered=False,
+ )
self.assertQuerysetEqual(
Employee.objects.filter(firstname__istartswith=F('lastname')),
["", ""],
- ordered=False)
+ ordered=False,
+ )
self.assertQuerysetEqual(
Employee.objects.filter(firstname__iendswith=F('lastname')),
[""],
- ordered=False)
+ ordered=False,
+ )
class ExpressionsNumericTests(TestCase):
diff --git a/tests/fixtures/tests.py b/tests/fixtures/tests.py
index f5df67a55b..a27ad6183d 100644
--- a/tests/fixtures/tests.py
+++ b/tests/fixtures/tests.py
@@ -334,7 +334,8 @@ class FixtureLoadingTests(DumpDataAssertMixin, TestCase):
self._dumpdata_assert(
['sites', 'fixtures'],
'[{"pk": 1, "model": "sites.site", "fields": {"domain": "example.com", "name": "example.com"}}]',
- exclude_list=['fixtures'])
+ exclude_list=['fixtures'],
+ )
# Excluding fixtures.Article/Book should leave fixtures.Category
self._dumpdata_assert(
diff --git a/tests/foreign_object/models/person.py b/tests/foreign_object/models/person.py
index a41d9d96d9..cd04d1eeda 100644
--- a/tests/foreign_object/models/person.py
+++ b/tests/foreign_object/models/person.py
@@ -88,7 +88,8 @@ class Friendship(models.Model):
on_delete=models.CASCADE,
from_fields=['from_friend_country', 'from_friend_id'],
to_fields=['person_country_id', 'id'],
- related_name='from_friend')
+ related_name='from_friend',
+ )
to_friend_country = models.ForeignObject(
Country,
diff --git a/tests/forms_tests/models.py b/tests/forms_tests/models.py
index 327fd7802c..23cabc2d84 100644
--- a/tests/forms_tests/models.py
+++ b/tests/forms_tests/models.py
@@ -50,8 +50,7 @@ class ChoiceModel(models.Model):
choice = models.CharField(max_length=2, blank=True, choices=CHOICES)
choice_string_w_none = models.CharField(
max_length=2, blank=True, null=True, choices=STRING_CHOICES_WITH_NONE)
- choice_integer = models.IntegerField(choices=INTEGER_CHOICES, blank=True,
- null=True)
+ choice_integer = models.IntegerField(choices=INTEGER_CHOICES, blank=True, null=True)
class ChoiceOptionModel(models.Model):
diff --git a/tests/forms_tests/tests/test_forms.py b/tests/forms_tests/tests/test_forms.py
index b326468d69..f603a95a17 100644
--- a/tests/forms_tests/tests/test_forms.py
+++ b/tests/forms_tests/tests/test_forms.py
@@ -3240,9 +3240,11 @@ Good luck picking a username that doesn't already exist.
bar = CharField()
def clean(self):
- raise ValidationError('