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

Move model_to_dict() into assertInstanceEqual(); clean up test data

This commit is contained in:
Jeremy Stretch
2020-02-05 15:47:50 -05:00
parent b0c0ad7c82
commit 0d3ff664b6
4 changed files with 78 additions and 158 deletions

View File

@@ -248,21 +248,8 @@ class InterfaceTestCase(StandardTestCases.Views):
'untagged_vlan': vlans[0].pk,
'tagged_vlans': [v.pk for v in vlans[1:4]],
'tags': 'Alpha,Bravo,Charlie',
# Extraneous model fields
'device': None,
'lag': None,
'cable': None,
'connection_status': None,
}
cls.csv_data = (
"device,name,type",
"Device 1,Interface 4,1000BASE-T (1GE)",
"Device 1,Interface 5,1000BASE-T (1GE)",
"Device 1,Interface 6,1000BASE-T (1GE)",
)
cls.bulk_create_data = {
'virtual_machine': virtualmachines[1].pk,
'name_pattern': 'Interface [4-6]',
@@ -287,3 +274,10 @@ class InterfaceTestCase(StandardTestCases.Views):
# 'untagged_vlan': vlans[0].pk,
# 'tagged_vlans': [v.pk for v in vlans[1:4]],
}
cls.csv_data = (
"device,name,type",
"Device 1,Interface 4,1000BASE-T (1GE)",
"Device 1,Interface 5,1000BASE-T (1GE)",
"Device 1,Interface 6,1000BASE-T (1GE)",
)