From 7c9e5d8acd5e3f4de1ae1c0f5bd986bfa19bd55c Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Thu, 6 Apr 2023 16:02:57 -0400 Subject: [PATCH] Fix skipped API tests --- netbox/users/tests/test_api.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/netbox/users/tests/test_api.py b/netbox/users/tests/test_api.py index a0bf8a49e..7041eb812 100644 --- a/netbox/users/tests/test_api.py +++ b/netbox/users/tests/test_api.py @@ -12,7 +12,7 @@ class AppTest(APITestCase): def test_root(self): url = reverse('users-api:api-root') - response = self.client.get('{}?format=api'.format(url), **self.header) + response = self.client.get(f'{url}?format=api', **self.header) self.assertEqual(response.status_code, 200) @@ -36,14 +36,17 @@ class UserTest(APIViewTestCases.APIViewTestCase): 'password': 'password6', }, ] + bulk_update_data = { + 'email': 'test@example.com', + } @classmethod def setUpTestData(cls): users = ( - User(username='User_1'), - User(username='User_2'), - User(username='User_3'), + User(username='User_1', password='password1'), + User(username='User_2', password='password2'), + User(username='User_3', password='password3'), ) User.objects.bulk_create(users) @@ -74,6 +77,12 @@ class GroupTest(APIViewTestCases.APIViewTestCase): ) Group.objects.bulk_create(users) + def test_bulk_update_objects(self): + """ + Disabled test. There's no attribute we can set in bulk for Groups. + """ + return + class TokenTest( # No GraphQL support for Token