summaryrefslogtreecommitdiff
path: root/tests/admin_views/forms.py
diff options
context:
space:
mode:
authordjango-bot <ops@djangoproject.com>2022-02-08 12:09:55 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-08 12:15:38 +0100
commit6a682b38e75d4c975b4c4493565a59f1bc14397c (patch)
tree0bd9cda550bea26238656d9f120d769e8b41bb9e /tests/admin_views/forms.py
parente73ce08888e6f34d3f050377cfd2fbb733be94a9 (diff)
[4.0.x] Refs #33476 -- Reformatted code with Black.
Backport of 9c19aff7c7561e3a82978a272ecdaad40dda5c00 from main.
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"]