1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #12193: Clean up tests (#12197)

* Fix skipped API tests

* Remove invalid tests

* Correct logger name
This commit is contained in:
Jeremy Stretch
2023-04-06 16:35:27 -04:00
committed by GitHub
parent 74d8baea30
commit 2bf9acfb19
3 changed files with 14 additions and 41 deletions

View File

@ -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