mirror of
https://github.com/netbox-community/netbox.git
synced 2026-03-29 22:02:11 +02:00
* Enable E501 rule * Configure ruff formatter * Reformat migration files to fix line length violations * Fix various E501 errors * Move table template code to template_code.py & ignore E501 errors * Reformat raw SQL
This commit is contained in:
@@ -109,9 +109,24 @@ class ClusterTest(APIViewTestCases.APIViewTestCase):
|
||||
ClusterGroup.objects.bulk_create(cluster_groups)
|
||||
|
||||
clusters = (
|
||||
Cluster(name='Cluster 1', type=cluster_types[0], group=cluster_groups[0], status=ClusterStatusChoices.STATUS_PLANNED),
|
||||
Cluster(name='Cluster 2', type=cluster_types[0], group=cluster_groups[0], status=ClusterStatusChoices.STATUS_PLANNED),
|
||||
Cluster(name='Cluster 3', type=cluster_types[0], group=cluster_groups[0], status=ClusterStatusChoices.STATUS_PLANNED),
|
||||
Cluster(
|
||||
name='Cluster 1',
|
||||
type=cluster_types[0],
|
||||
group=cluster_groups[0],
|
||||
status=ClusterStatusChoices.STATUS_PLANNED,
|
||||
),
|
||||
Cluster(
|
||||
name='Cluster 2',
|
||||
type=cluster_types[0],
|
||||
group=cluster_groups[0],
|
||||
status=ClusterStatusChoices.STATUS_PLANNED,
|
||||
),
|
||||
Cluster(
|
||||
name='Cluster 3',
|
||||
type=cluster_types[0],
|
||||
group=cluster_groups[0],
|
||||
status=ClusterStatusChoices.STATUS_PLANNED,
|
||||
),
|
||||
)
|
||||
for cluster in clusters:
|
||||
cluster.save()
|
||||
@@ -169,9 +184,25 @@ class VirtualMachineTest(APIViewTestCases.APIViewTestCase):
|
||||
device2 = create_test_device('device2', site=sites[1], cluster=clusters[1])
|
||||
|
||||
virtual_machines = (
|
||||
VirtualMachine(name='Virtual Machine 1', site=sites[0], cluster=clusters[0], device=device1, local_context_data={'A': 1}),
|
||||
VirtualMachine(name='Virtual Machine 2', site=sites[0], cluster=clusters[0], local_context_data={'B': 2}),
|
||||
VirtualMachine(name='Virtual Machine 3', site=sites[0], cluster=clusters[0], local_context_data={'C': 3}),
|
||||
VirtualMachine(
|
||||
name='Virtual Machine 1',
|
||||
site=sites[0],
|
||||
cluster=clusters[0],
|
||||
device=device1,
|
||||
local_context_data={'A': 1},
|
||||
),
|
||||
VirtualMachine(
|
||||
name='Virtual Machine 2',
|
||||
site=sites[0],
|
||||
cluster=clusters[0],
|
||||
local_context_data={'B': 2
|
||||
}),
|
||||
VirtualMachine(
|
||||
name='Virtual Machine 3',
|
||||
site=sites[0],
|
||||
cluster=clusters[0],
|
||||
local_context_data={'C': 3}
|
||||
),
|
||||
)
|
||||
VirtualMachine.objects.bulk_create(virtual_machines)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user