mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 17:26:10 -06:00
Fix skipped API tests
This commit is contained in:
parent
74d8baea30
commit
7c9e5d8acd
@ -12,7 +12,7 @@ class AppTest(APITestCase):
|
|||||||
def test_root(self):
|
def test_root(self):
|
||||||
|
|
||||||
url = reverse('users-api:api-root')
|
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)
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|
||||||
@ -36,14 +36,17 @@ class UserTest(APIViewTestCases.APIViewTestCase):
|
|||||||
'password': 'password6',
|
'password': 'password6',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
bulk_update_data = {
|
||||||
|
'email': 'test@example.com',
|
||||||
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpTestData(cls):
|
def setUpTestData(cls):
|
||||||
|
|
||||||
users = (
|
users = (
|
||||||
User(username='User_1'),
|
User(username='User_1', password='password1'),
|
||||||
User(username='User_2'),
|
User(username='User_2', password='password2'),
|
||||||
User(username='User_3'),
|
User(username='User_3', password='password3'),
|
||||||
)
|
)
|
||||||
User.objects.bulk_create(users)
|
User.objects.bulk_create(users)
|
||||||
|
|
||||||
@ -74,6 +77,12 @@ class GroupTest(APIViewTestCases.APIViewTestCase):
|
|||||||
)
|
)
|
||||||
Group.objects.bulk_create(users)
|
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(
|
class TokenTest(
|
||||||
# No GraphQL support for Token
|
# No GraphQL support for Token
|
||||||
|
Loading…
Reference in New Issue
Block a user