summaryrefslogtreecommitdiff
path: root/tests/admin_views/forms.py
diff options
context:
space:
mode:
authordjango-bot <ops@djangoproject.com>2022-02-03 20:24:19 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-07 20:37:05 +0100
commit9c19aff7c7561e3a82978a272ecdaad40dda5c00 (patch)
treef0506b668a013d0063e5fba3dbf4863b466713ba /tests/admin_views/forms.py
parentf68fa8b45dfac545cfc4111d4e52804c86db68d3 (diff)
Refs #33476 -- Reformatted code with Black.
Diffstat (limited to 'tests/admin_views/forms.py')
-rw-r--r--tests/admin_views/forms.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/admin_views/forms.py b/tests/admin_views/forms.py
index b25e49246a..e9d9c0a8a5 100644
--- a/tests/admin_views/forms.py
+++ b/tests/admin_views/forms.py
@@ -4,17 +4,16 @@ from django.core.exceptions import ValidationError
class CustomAdminAuthenticationForm(AdminAuthenticationForm):
-
class Media:
- css = {'all': ('path/to/media.css',)}
+ css = {"all": ("path/to/media.css",)}
def clean_username(self):
- username = self.cleaned_data.get('username')
- if username == 'customform':
- raise ValidationError('custom form error')
+ username = self.cleaned_data.get("username")
+ if username == "customform":
+ raise ValidationError("custom form error")
return username
class MediaActionForm(ActionForm):
class Media:
- js = ['path/to/media.js']
+ js = ["path/to/media.js"]