mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-27 15:47:46 -06:00
Initial work on #20210
This commit is contained in:
@@ -197,7 +197,7 @@ class TokenTest(
|
||||
APIViewTestCases.DeleteObjectViewTestCase
|
||||
):
|
||||
model = Token
|
||||
brief_fields = ['description', 'display', 'id', 'key', 'url', 'write_enabled']
|
||||
brief_fields = ['description', 'display', 'id', 'key', 'url', 'version', 'write_enabled']
|
||||
bulk_update_data = {
|
||||
'description': 'New description',
|
||||
}
|
||||
@@ -256,8 +256,8 @@ class TokenTest(
|
||||
|
||||
response = self.client.post(url, data, format='json', **self.header)
|
||||
self.assertEqual(response.status_code, 201)
|
||||
self.assertIn('key', response.data)
|
||||
self.assertEqual(len(response.data['key']), 40)
|
||||
self.assertIn('token', response.data)
|
||||
self.assertEqual(len(response.data['token']), 40)
|
||||
self.assertEqual(response.data['description'], data['description'])
|
||||
self.assertEqual(response.data['expires'], data['expires'])
|
||||
token = Token.objects.get(user=user)
|
||||
|
||||
Reference in New Issue
Block a user