diff --git a/bookwyrm/tests/views/test_federation.py b/bookwyrm/tests/views/test_federation.py index b56c2581e..2afdd6d3c 100644 --- a/bookwyrm/tests/views/test_federation.py +++ b/bookwyrm/tests/views/test_federation.py @@ -145,11 +145,12 @@ class FederationViews(TestCase): view = views.ImportServerBlocklist.as_view() request = self.factory.post( - "", { + "", + { "json_file": SimpleUploadedFile( "file.json", open("file.json", "rb").read() ) - } + }, ) request.user = self.local_user request.user.is_superuser = True diff --git a/bookwyrm/views/federation.py b/bookwyrm/views/federation.py index 25cd212b3..db54cd7aa 100644 --- a/bookwyrm/views/federation.py +++ b/bookwyrm/views/federation.py @@ -79,9 +79,7 @@ class ImportServerBlocklist(View): def post(self, request): """ add a server from the admin panel """ - json_data = json.load( - request.FILES["json_file"] - ) + json_data = json.load(request.FILES["json_file"]) failed = [] success_count = 0 for item in json_data: