diff --git a/bookwyrm/tests/views/test_federation.py b/bookwyrm/tests/views/test_federation.py index 3783417c1..591bb62a9 100644 --- a/bookwyrm/tests/views/test_federation.py +++ b/bookwyrm/tests/views/test_federation.py @@ -62,3 +62,23 @@ class FederationViews(TestCase): view(request, server.id) server.refresh_from_db() self.assertEqual(server.status, "federated") + + def test_edit_view_get(self): + """ there are so many views, this just makes sure it LOADS """ + # create mode + view = views.EditFederatedServer.as_view() + request = self.factory.get("") + request.user = self.local_user + request.user.is_superuser = True + + result = view(request, server=None) + self.assertIsInstance(result, TemplateResponse) + result.render() + self.assertEqual(result.status_code, 200) + + # edit mode + server = models.FederatedServer.objects.create(server_name="hi.there.com") + result = view(request, server=server.id) + self.assertIsInstance(result, TemplateResponse) + result.render() + self.assertEqual(result.status_code, 200)