mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Merge branch 'develop' into develop-2.8
This commit is contained in:
@@ -2017,6 +2017,20 @@ class DeviceTest(APITestCase):
|
||||
|
||||
self.assertFalse('config_context' in response.data['results'][0])
|
||||
|
||||
def test_unique_name_per_site_constraint(self):
|
||||
|
||||
data = {
|
||||
'device_type': self.devicetype1.pk,
|
||||
'device_role': self.devicerole1.pk,
|
||||
'name': 'Test Device 1',
|
||||
'site': self.site1.pk,
|
||||
}
|
||||
|
||||
url = reverse('dcim-api:device-list')
|
||||
response = self.client.post(url, data, format='json', **self.header)
|
||||
|
||||
self.assertHttpStatus(response, status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
|
||||
class ConsolePortTest(APITestCase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user